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 9 of 9
  1. #1
    New Coder
    Join Date
    Jul 2007
    Location
    Portland, OR
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Header text adjustment

    I know this is simple, but how do I get the header title equal distance between top and bottom?
    Please view: http://www.nwparkingcontrol.com

    I tried to add more to top margin, but that didn't move it down.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    First of all add
    Code:
    *{
    margin:0;
    padding:0;
    }
    in to your CSS to remove all default margins and paddings(this will help you to get a uniform layout in all browser by setting specific values).
    then add padding-top:40px or some equivalent to header h1.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Jul 2007
    Location
    Portland, OR
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, that works! http://www.nwparkingcontrol.com

    How would I add extra white space between text and image to make the site taller?
    I've tried using [<p>&nbsp;&nbsp;&nbsp;</p>] and I don't think that works very well. I tried adding padding to the img style and that didn't work. Maybe I wrote it wrong.
    Last edited by vinoman; 10-27-2007 at 01:53 PM.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    This can be achieved by adding margin-top/margin-bottom wherever required.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New Coder
    Join Date
    Jul 2007
    Location
    Portland, OR
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks again. I added margins to the image. How do you add margins to a paragraph of text? [<p>text</p>]

    Also: what's the style to center all the text and image?
    Last edited by vinoman; 10-27-2007 at 03:15 PM.

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Have a look at http://www.w3schools.com/css/css_reference.asp
    Code:
    p{
    margin-left:auto;
    margin-right:auto;
    }
    Last edited by abduraooft; 10-27-2007 at 03:48 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    New Coder
    Join Date
    Jul 2007
    Location
    Portland, OR
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK, I did that, but why isn't there a space between the h4 tags, h3 tagsand the first p tags?
    Last edited by vinoman; 10-27-2007 at 04:16 PM.

  • #8
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    The answer is in my first post.
    In order to get gaps between elements, you have to explicitly specify how much you want.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #9
    New Coder
    Join Date
    Jul 2007
    Location
    Portland, OR
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, so the styles override the the normal spaces between h and p tags?


  •  

    Posting Permissions

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