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 5 of 5

Thread: CSS Page help

  1. #1
    New to the CF scene
    Join Date
    Feb 2008
    Location
    VA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS Page help

    I am fairly new to this website, but I figured that since I am in this major joining a community for various aspects and solutions to problems would be a great way to understand things that I may not. This is an assignment for my class that has been completed except for one thing...I cannot figure out how to get a 30px space between my nav bar and my content. Any feedback or suggestions would be great. Here is the link to the page.

    http://mason.gmu.edu/~jwrightf/IT331/CSS_layout.html

  • #2
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,179
    Thanks
    174
    Thanked 257 Times in 257 Posts
    the link just takes me to a blank page, but if you have a class or a div assigned to the content then in it just write this

    Code:
    #content {
    margin-top:30px;
    }
    hope it helps

  • #3
    Banned
    Join Date
    Feb 2008
    Location
    Winnipeg, Canada
    Posts
    396
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Change
    Code:
    	#nav{
    	vertical-align: top;
    	width: 140px;
       	margin: 0 0 0 0;
    	padding: 0;
    	border-top: 1px solid #000;
    	border-right: 1px solid #000;
    	margin: 0px;
    	font-size: 80%;
    	padding: 0px;
    	width: 140px;
    	float:left;
        }
    To:
    Code:
    	#nav{
    	vertical-align: top;
    	width: 140px;
       	margin: 0 30px 0 0;
    	padding: 0;
    	border-top: 1px solid #000;
    	border-right: 1px solid #000;
    	font-size: 80%;
    	width: 140px;
    	float:left;
        }

    P.S. You only need margin/padding ONCE per element

  • #4
    New to the CF scene
    Join Date
    Feb 2008
    Location
    VA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you so much!! I had been looking at that internal CSS for 3 days straight now. If I wasn't in class I was trying to figure out exactly which part was messed up. I will make sure to remember "one per element." I think I had gotten to the point that I was adding attributes instead of modifying the ones that already existed.

  • #5
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    #nav{
    vertical-align: top;
    width: 140px;
    margin: 0 30px 0 0;
    padding: 0;
    border-top: 1px solid #000;
    border-right: 1px solid #000;
    font-size: 80%;
    width: 140px;
    float:left;
    }

    You only need width set once also.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

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