...

View Full Version : CSS padding on a header being ignored



beNcooKe
03-21-2005, 03:07 PM
Hi,

Im doing some CSS for research to a new site at http://www.oxoid.com/2005/beNhome.asp Im having problems with the black header with the blue background. Im trying to get it in the middle of the blue bar vertically speaking but both IE and firefox seem to ignore my margin attributes in my CSS code.

my CSS is as follows. Any pointers?

beN

#prod_info_wrapper {
margin:0;
padding:0;
border-bottom:1px solid #FFF;
}
#prod_info_list {
font: 0.60em Arial, Helvetica, sans-serif;
float:left;
background:#FFF;
margin:0;
border-right:1px solid #F6CA26
}
/* CSS for the list div elements*/
#prod_info_list ul {
/* list-style-type:none;*/
margin:0px 0px 2px 2px;
padding:1px;
border-left: 10px solid #F6CA26;
list-style:none;
}
#prod_info_list li {
padding:0;
margin:0;
width:179px;
}
#prod_info_list h3 {
background:#F6CA26;
text-align:center;
color:#FFF;
font-weight:bold;
font-size: 1.3em;
width:182px;
margin:2px;
padding:1px 4px;
}
/* CSS for the content div elements*/
#prod_info_content_header {
margin:0;
float:right;
background-color:#0084B7;
border-bottom: 1px solid #F6CA26;
width:570px;
}
#omdCatHeader {
float:left;
margin:0;
width:476px;
}
#omdCatHeader h2 {
display:block;
margin:0;
padding:7px 0 7px 11px;
font:Arial, Helvetica, sans-serif;
font-size:1.8em;
}
#omdHeaderImg {
float:right;
/*display:inline;*/
padding:7px 11px 9px 0;
}

_Aerospace_Eng_
03-21-2005, 06:03 PM
by default the h2 header already has a top margin, 13px seems to get it close

#omdCatHeader h2 {
margin:13px 0 7px 11px;
font:Arial, Helvetica, sans-serif;
font-size:1.8em;

}
see if that works, and you dont have to display block its already a block element

beNcooKe
03-22-2005, 10:41 AM
that works. Cheers again for your help.

I was sure I had tried the margin thing but there must have been something else at the time conflicting with it.

Thanks again,

beNcooKe



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum