I want the my page to have a black background and orange text but it comes out with black text and a red background. Please help. Here's the code: <html> <head> <title>The Complete Soccer Guide- Soccer tips,guide,games,videos,pictures,forums,and more</title> <style type="text/css"> body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } #header { margin: 20px; padding: 10px; height: 100px; } #left { position: absolute; left: 15px; top: 160px; width: 200px; } #center { top: 0; margin-left: 230px; margin-right: 230px; } #right { position: absolute; right: 15px; top: 160px; width: 200px; } </style> </head> <body bgcolor="black"<FONT color="white"</FONT>" <body> <div id="header"> <img src="Soccer Logo.jpg" /> </div> <div id="left"> </div> <div id="center"> <h1>Mental Soccer Guides</h1> <p> Under Construciton <div id="right"> </div> </body> </html>
Well for starters cleaning up the code would be a good idea. Please for god sake keep presentation away from structure. What i mean is dont use styling within the html document. you specify the background image ,color, font size ,font weight, font family, text decoration, Background color etc all in the css. Thats the whole point in the cascade style sheet. To easily maintain a website which by editing one file globally effects the way the website looks. What i mean is this (WRONG SYTAX) You have two body tags which you canot have. There should not be two body tags. If you wanted to style the body tags do it in the css document. Also if you want to declare a margin to default 0 then simply margin: 0; <html> <head> <title>The Complete Soccer Guide- Soccer tips,guide,games,videos,pictures,forums,and more</title> <style type="text/css"> body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } #header { margin: 20px; padding: 10px; height: 100px; } #left { position: absolute; left: 15px; top: 160px; width: 200px; } #center { top: 0; margin-left: 230px; margin-right: 230px; } #right { position: absolute; right: 15px; top: 160px; width: 200px; } </style> </head> <body bgcolor="black"<FONT color="white"</FONT>" <body> <div id="header"> <img src="Soccer Logo.jpg" /> </div> <div id="left"> </div> <div id="center"> <h1>Mental Soccer Guides</h1> <p> Under Construciton <div id="right"> </div> </body> </html> Code (markup): Correct Syntax HTML DOCUMENT <html> <head> <title>The Complete Soccer Guide- Soccer tips,guide,games,videos,pictures,forums,and more</title> <style type="text/css"> </head> <body> <div id="header"> <a href=""><img src="Soccer Logo.jpg" /></a><!--Makes the logo clickable as it is now a link--> </div><!--End of Header--> <div id="left"> </div><!--End of Left--> <div id="center"> <h1>Mental Soccer Guides</h1> <p> Under Construciton</p? </div><!--End of Center--> <div id="right"> </div><!--End of Right--> </body> </html> Code (markup): Also why use position absolute . You do know you only use position:absolute if you wish to take it out of the general flow/structure of the site. Use floats instead. If you could show us a link to your site i can quickly fix it up for you using proper correct usage of the css + html syntax. I cant redo your css file until actually see what it is you are trying to do.
For your css if you want all your text to apprear white then simply add the flowing to our css style sheet. This applys a black background with all text within the whole document as white. If you wish to specify a colour to specific tag ie h1 body{ margin: 0; background-color: #000000; color:#ffffff; } h1{ color: #Hex code Goes Here; } Code (markup):