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

Thread: padding problem

  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Posts
    399
    Thanks
    33
    Thanked 7 Times in 7 Posts

    padding problem

    Code:
    <style type="text/css">
    * {
    margin: 0;
    padding: 0;
    }
    body {
    background-image: url(images/main.jpg);
    background-repeat: no-repeat;
    }
    
    #header {
    margin-left:98px;
    padding-top:14px;
    height:38px;
    width:415px ;
    font-family:Georgia,verdana;
    font-size:12px;
    font-weight:bold;
    letter-spacing:;
    background-color: #7c907e;
    color:black;
    }
    
    
    </style>
    i have a problem with this piece of code: I need the header to be 38px height(as it is declared in the css) but if i add this padding-top of 14px in it this makes the header grow and not be anymore 38px height...

  • #2
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    padding is added on the the height.

    so 38(what you want)-14(padding, top and bottom) = 24(what you should put as height)
    make the height 24 px and it should work.
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • Users who have thanked twodayslate for this post:

    sybil6 (10-17-2007)

  • #3
    Regular Coder
    Join Date
    Jul 2006
    Posts
    399
    Thanks
    33
    Thanked 7 Times in 7 Posts
    thank you! this explains everything.


  •  

    Posting Permissions

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