roondog Posted March 18, 2007 Share Posted March 18, 2007 I've got four divs within a container but they are not showing in the correct order. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head><style type="text/css">.fixtures{ width:800px; }table{margin-top: 10px;width: 800px;background-color:white;text-align: left;}</style><link rel="stylesheet" type="text/css"href="/thfc/stylesheet.css" /><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>THFC Fixtures</title> </head> <body><div id="container"><div id="banner"><img src="/thfc/pictures/fixtures.jpg" alt="banner" /></div><div id="links"><a href="/index.html">HOME</a> |<a href="/mainpages/news.html">NEWS</a> | <a href="/mainpages/table.html">TABLE</a> | <a href="/mainpages/profiles.html">PLAYERS</a> | <a href="/mainpages/stats.html">STATISTICS</a> | <a href="/mainpages/info.html">CLUB INFO</a> | <a href="/mainpages/archive.html">ARCHIVE</a> | <a href="/mainpages/wallpaper.html">DOWNLOADS</a> | <a href="http://www.a-free-guestbook.com/guestbook.php?username=Tevershamhotspurs">GUESTBOOK</a> | <a href="/mainpages/links.html">LINKS</a> </div><div class="fixtures"><table><tr><td>guhuhuh</td></tr></div></div><div id="footer"><span>© Teversham Hotspurs F.C | Design by Roondog Interweb Design MMVII | Contact<span></div></body></html> body{margin: 0;font-family: tahoma;font-size:.9em;background:url(/thfc/pictures/bg.jpg);}#container{margin:0 auto;width: 800px;height: 650px;text-align:left;}#containerb{margin:0 auto;width: 800px;height: 100%;text-align:left;}#banner{ width:800px; height:100px; background: url(/thfc/pictures/title.jpg); border: 1px solid black;}#links{ width: 750px; height: 25px; background-color: yellow; padding-top: 5px; padding-left: 50px; margin-top: 5px; border: 1px solid black;}#main{ width: 800px; height: 485px; margin-top: 10px; padding-top:15px; background: url(/thfc/pictures/homeback.gif);}#footer{ width: 800px; height: 22px; margin-top:10px; padding-top:3px; background: url(/thfc/pictures/border.gif); font-size:.8em; text-align:center;}#top{ width:800px; height: 200px; margin-top:0px;}#bottom{ width:800px; height: 200px; margin-top:50px;}#blocka{ width:144px; height:217px; margin-left: 20px; padding-top:3px; float:left; background:url(/thfc/pictures/homelink.gif)}#blockb{ width:144px; height:217px; margin-left: 10px; padding-top:3px; float:left; background:url(/thfc/pictures/homelink.gif)}#title{ margin-left:20px;}a{ color:black; text-decoration:none;}a:link{}a:visited{}a:hover{ text-decoration:underline;}a:active{} The fixtures and footer divs are showing the wrong way round. Really not sure why. Link to comment Share on other sites More sharing options...
iyeru42 Posted March 19, 2007 Share Posted March 19, 2007 Unclosed table within your fixtures div may be the problem. Link to comment Share on other sites More sharing options...
roondog Posted March 19, 2007 Author Share Posted March 19, 2007 Thanks i think that must have been it. Link to comment Share on other sites More sharing options...
iyeru42 Posted March 20, 2007 Share Posted March 20, 2007 You can also make DIVs act like tables like below: <div class="table"> <div class="left">Left Content A</div><div class="left">Left Content B</div> <div class="right">Right Content A</div></div> Where the Classes would be: .table { margin:2px; padding:2px;}.left { float:left;}.right { float:right;} Keep in mind, depending on where you put your DIVs, DIVs may appear a bit up or below from other DIVs. (Below would be to the right or below, and above would be above or left of.) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now