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
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    body background in external css not working

    I just transfered all of my styles to an external CSS document. Everything went well, a few things that I needed to tweak, except for the one thing I thought would go smoothest.
    Code:
    		body{
    			background-color: red;
    			text-align: center;
    		}
    I have no background color, and my alignment is back to left. Huh? It's a body tag... why wouldn't it work? Any thoughts?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    I have no background color, and my alignment is back to left. Huh? It's a body tag... why wouldn't it work? Any thoughts?
    Please post your entire code or a link to your page would be much better.
    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
    Jun 2008
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh yeah, sorry, should have thought of that.

    http://jfinner1.co.cc/

    The Home, Biography, and Goals pages are done. The Bio page still has the CSS in the page instead of external, so the background works like it's supposed to. And please forgive the absolute corny-ness of it all... The site is for a school project, so each page is pretty much defined for us...

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Remove the html tags from your css file
    Code:
    <style type="text/css">
    </style>
    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
    Jun 2008
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, I feel really dumb now. Please forgive me, I've only been doing this for 5 weeks, and this is the first time I've taken my styles external. I still feel dumb, lol.

    Thank you for clearing that up for me. *blush*


  •  

    Posting Permissions

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