---
title: "Problem med height i IE"
type: "forum-thread"
url: "https://www.webforum.nu/amne/html-css/127399-problem-med-height-i-ie"
topic: "HTML & CSS"
topic_url: "https://www.webforum.nu/amne/html-css"
author: "SebastianE"
published: "2005-04-30T14:45:36.000Z"
updated: "2005-04-30T20:38:04.000Z"
replies: 2
views: 313
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/html-css/127399-problem-med-height-i-ie"
---

# Problem med height i IE

## #1 — SebastianE, 2005-04-30T14:45Z

Jag håller på att dona med en sida. Sidan är gjord med XHTML och CSS2. Problemet jag har är att en "tabell" som är 10px hög visas bra i Opera men däremot i IE visas den som 25 px. Någon som vet hur man ordnar problemet?

Kod:
/\* Får ej kopieras \*/
/\* Sidegenskaper \*/
HTML, BODY {
background-color: #202020;
padding: 0px; /\* måste bland annat has till Opera \*/
height:100%; /\*\*/
margin-top: 0px;
margin-bottom: 0px;
scrollbar-face-color: #1C1C1C;
scrollbar-shadow-color: #0F0F0F;
scrollbar-highlight-color: #343434;
scrollbar-3dlight-color: #1C1C1C;
scrollbar-darkshadow-color: #0F0F0F;
scrollbar-track-color: #1C1C1C;
scrollbar-arrow-color: #595959;
}
/\*-----------------------------------------------------------------------------------------------------------------------------------\*/ 
/\* Länk färger \*/
A:LINK {
color: #F4F4F4;
text-decoration : none;
}

A:VISITED {
color: #FF9000;
text-decoration : none;
}

A:ACTIVE {
color: #FF9000;
}

A:HOVER {
color: #000;
}
/\*-----------------------------------------------------------------------------------------------------------------------------------\*/ 
/\* Boxar \*/
\#container {
margin: 0 auto;
width: 760px;
background-image: url(grafik/tbg.gif);
min-height:100%; /\*\*/
}

\#wid {
margin: 0 auto;
width: 656px;
}

\#hoger {
float: right;
}

/\* Nyheter \*/
\#nyhet {
margin: 0 auto;
float: left;
margin-left: 23px;
width: 146px;
}

\#nyheta {
margin: 0 auto;
float: left;
margin-left: 0px;
width: 146px;
height: 35px;
}

\#nyhetb {
margin: 0 auto;
float: left;
margin-left: 0px;
width: 146px;
background-image:  url(grafik/vmenutbg.gif);
vertical-align: top;
}

\#nyhetc {
margin: 0 auto;
float: left;
margin-left: 0px;
width: 146px;
height: 18px;
background-image:  url(grafik/vmenubott.gif);
vertical-align: top;
}

\#nyhetaa {
margin: 0 auto;
float: left;
margin-left: 0px;
width: 146px;
height: 35px;
}

\#nyhetbb {
margin: 0 auto;
float: left;
margin-left: 0px;
width: 146px;
background-image:  url(grafik/vmenutbg.gif);
vertical-align: top;
}

\#nyhetcc {
margin: 0 auto;
float: left;
margin-left: 0px;
width: 146px;
height: 18px;
background-image:  url(grafik/vmenubott.gif);
vertical-align: top;
}

\#nyhetmellanrum {
margin: 0 auto;
float: left;
margin-left: 0px;
width: 146px;
height: 10px;
}

/\* ToppRutor \*/
\#toppruta {
margin: 0 auto;
width: 656px;
height: 162px;
background-image:  url(grafik/menutbg.gif);
}

\#rutaa {
margin: 0 auto;
float: left;
margin-top: 96px;
width: 136px;
height: 48px;
text-align: center;
}

\#rutab {
margin: 0 auto;
margin-top: 87px;
float: left;
width: 196px;
height: 48px;
}

\#rutac {
margin: 0 auto;
margin-top: -10px;
float: left;
width: 656px;
height: 27px;
}

/\* RUTAN DÄR PROBLEMET FINNS \*/
\#rutad {
width: 656px;
height: 10px;
}

/\* SidRutor \*/
\#sida {
margin: 0 auto;
float: rigth;
margin-right: 23px;
width: 433px;
}

\#sidatopp {
margin: 0 auto;
float: rigth;
width: 433px;
height: 21px;
background-image:  url(grafik/truta/topptbg.gif);
}

\#sidatext {
margin: 0 auto;
float: rigth;
width: 433px;
background-image:  url(grafik/truta/tbg.gif);
}

\#sidabott {
margin: 0 auto;
float: rigth;
width: 433px;
height: 20px;
background-image:  url(grafik/truta/bottbg.gif);
}

/\* Textrutor färger \*/
INPUT, TEXTAREA, OPTION, SELECT {
background-color : #FFFFFF ;
border : 1px solid #666666;
font : 10px Verdana Arial Helvetica sans-serif;
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : 10px; color: #666666;
}

/\* Textfärger \*/
.Text {
color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

.Rub {   
color: #FF9000;
font-family: Verdana, Tahoma, Arial, Times;
font-size: 11px;
font-weight: bold;
}

.Head {
color: #DF4900;
font-family: Tahoma, Verdana, Tahoma, Arial, Times;
font-size: 13px;
font-weight: bold;
}

.Elix {
color: #5495D1;
font-family: Verdana, Tahoma, Arial, Times;
font-size: 10px;
font-weight: bold;
}

.text {  
color: #fff;
font-family: Verdana, Times, Arial;
font-size: 12px;
margin-left: 5px;
text-align: left;
}

.bilder {
float: left;
border: none;
}

Permalänk: https://www.webforum.nu/p/127399

## #2 — zcorpan, 2005-04-30T17:46Z

(Ett tips är att använda \[kod\] så blir det lite lättare att läsa ;))

Om du använder XHTML så måste du använda små bokstäver för element-namn och attribut - även i stilmallen! XML är lägestkänsligt så "HTML" i stilmallen motsvarar \<HTML\> men inte \<html\> ;)

Testa att lägga till 

```
* { margin:0; padding:0; }
```

 högst upp i stilmallen och se vad som händer. :)

Permalänk: https://www.webforum.nu/p/1604432

## #3 — SebastianE, 2005-04-30T20:38Z

Okej, jag försökte leta reda på det. Men jag hittade det aldrig. Okej tackar för svaret. Jag körde font-size: 0px; vilket fungerade. Jag har märkt det. Alla sidor är inte XHTML och sidan håller på görs om med XHTML & CSS :p

Permalänk: https://www.webforum.nu/p/1604467

---

Tråden på webben: https://www.webforum.nu/amne/html-css/127399-problem-med-height-i-ie
