jerry2
12-10-2006, 12:22 PM
Hi there
When building my sites I found out that the padding I do on the div id is allways added to the width of the div id. Is that correct?
Example:
#Container {
width:888px;
height:100%;
}
#head-bottom1 {
height: 164px;
width: 190px;
padding:5px 5px;
float:left;
}
#head-bottom2 {
height: 164px;
width: 380px;
padding:5px 5px;
float:left;
text-align:center;
}
#head-bottom2 h1 {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:15px;
color:#007ED2;
}
#head-bottom3 {
width:258px;
height: 152px;
float:left;
background-color:#E5B109;
background-image:url(grafika/logo-prehod.gif);
background-repeat:no-repeat;
background-position:0 0;
padding-left:40px;
}
The three div-id's I use to break my head into 3 pieces are all together 888px. But only if you count the left and right paddings also!!! The result is consistent in all browsers...
But from my learnings the padding is INSIDE of DIV. Am I missing something or doing something the wrong way?
Yours
Jerry
When building my sites I found out that the padding I do on the div id is allways added to the width of the div id. Is that correct?
Example:
#Container {
width:888px;
height:100%;
}
#head-bottom1 {
height: 164px;
width: 190px;
padding:5px 5px;
float:left;
}
#head-bottom2 {
height: 164px;
width: 380px;
padding:5px 5px;
float:left;
text-align:center;
}
#head-bottom2 h1 {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:15px;
color:#007ED2;
}
#head-bottom3 {
width:258px;
height: 152px;
float:left;
background-color:#E5B109;
background-image:url(grafika/logo-prehod.gif);
background-repeat:no-repeat;
background-position:0 0;
padding-left:40px;
}
The three div-id's I use to break my head into 3 pieces are all together 888px. But only if you count the left and right paddings also!!! The result is consistent in all browsers...
But from my learnings the padding is INSIDE of DIV. Am I missing something or doing something the wrong way?
Yours
Jerry