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 6 of 6
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Padding/marging text augh!

    Hi all..

    I'm trying to position the text in my nav bar, with 12 pixels of space on top, and 12 below...
    here's what I have...
    Code:
    .links {
    	font-family: Arial, Helvetica, Verdana, Sans-serif;
    	font-size: 14px;
    	color:#ffffff;
    	font-weight: bold;
    	padding:12px 0px;
    }
    shouldn't that work? I know it's something reaaaaaaaaally stupid I'm missing! I tried using margin instead of padding and still got nowhere...

    I also have this for my body
    Code:
    body {
    	margin:0px auto;
    	border:0;
    	width:800px;
    	background:#fff;
    	font-family: Arial, Helvetica, Verdana, Sans-serif;
    	font-size: 12px;
    	color:black;
    	font-weight: bold;
        }
    But how do I make the text in the body have a 5px padding on the right and left hand sides?

    I've been looking for the past hour, and yes, I'm a newbie and clueless with it! Nothing I try works!

    thanks for any help....=)

    carrie

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I'm trying to position the text in my nav bar, with 12 pixels of space on top, and 12 below...
    Try setting a line-height with some big value instead.
    But how do I make the text in the body have a 5px padding on the right and left hand sides?
    Please post your complete code (html+CSS) or a link to your page.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    intcon (05-24-2010)

  • #3
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    well i'll be darned. that worked!

    here's my page...
    http://www.monarchcottages.com/hobbit/

    and my css
    http://www.monarchcottages.com/hobbit/hobbit.css

    I'm also hoping to continue running a green column down the left hand side... but was going to save that for a different post...=)..if you'd like to take a shot at it though, I'd hugely appreciate it!

    thanks so much!

    carrie

  • #4
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    any thoughts anyone?

    =)

    thanks

    carrie

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello intcon,
    The easiest way to get your green column to go the full height of your container is a method called faux columns.
    Google that for more examples.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    intcon (05-24-2010)

  • #6
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    thanks for the answer excavator! much appreciated!

    carrie


  •  

    Posting Permissions

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