Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS padding on a header being ignored

    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;
    }

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    by default the h2 header already has a top margin, 13px seems to get it close
    Code:
    #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

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •