August 5, 200818 yr Hi everyone, can someone please help with with aligning this website? As you can see on the link it is a little out of place ^.^ I need the left adn right sections aligned next to each toehr but the right section keeps running away from the left Link:http://www.alex-mcintosh.com/kevin HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Kevin's Resource Center</title> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <!-- Start Logo --> <div id="logo"> <img src="images/logo.png" alt="Kevins Resource Center logo" /> </div> <!-- End logo --> <!-- Start Navigation --> <div id="navigation"> <p>Home</p> </div> <!-- End navigation --> <div id="content"> <!-- Start Page --> <div id="page"> <h1>First header</h1> <div class="post"> <p>This is how a normal annocment can be made, above is a header which has no link to it and below here is a normal set of text.</p> <p>In this new paragraph you can see that <a href="#">this</a> is a link, notice how it is differnt?</p> </div> <h1><a href="#">Second header</a></h1> <div class="post"> <p>Above is a link that is within the header, that is a H1 tag but with an ancher also.</p> </div> <h1>Information on links</h1> <div class="post"> <p>When you look at a page, you can tell a link because of its blue color, when you highlight it, the link will turn into uppercase and will underline, this gives a better dinstinction between a link and plain text.</p> <p>For headers the same rule applies where if you hover over it the link will change but also the differnce between a normal header and that with a link is that the normal headers are in plain black, a links is a lighter shade of black (Grey )</p> </div> </div> <!-- End Page --> <!-- Start Sidebar --> <div id="sidebar"> <h1>Catagories</h1> <hr /> <p>Catagory 1</p> <hr /> <p>Catagory 2</p> <hr /> <p>Catagory 3</p> <hr /> <p>Catagory 4</p> <hr /> <p>Catagory 5</p> <hr /> <p> </p> <h1>News</h1> <p>Here you can have news, i dont know if you want to get rid of this area though because you can announce new stuff in the center. Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p> </div> <!-- End Sidebar --> </div> <!-- Start footer --> <div id="footer"> <img src="images/footer.png"> </div> <!-- End Footer --> </body> </html> CSS: /* Start Style.CSS */ /* Body & Text */ body { background: #FFFFFF; color: #000000; font-family: "Trebuchet MS", Arial, Helvetica; text-size: 0.9em; } h1 { font-size: 1.4em; color: #000000; text-transform: capitalize; } h2 { font-size: 1.2em; color: #000000; } h3 { font-size: 1em; color: #000000; } h1 a{ color: #383737; } h1 a:hover { text-decoration: underline; text-transform: uppercase; } h2 a{ color: #000000; } h3 a{ color: #000000; } /* Page Links */ a { color: #446882; text-decoration: none; } a:hover { color: #000000; text-decoration: underline; text-transform: uppercase; } /* logo */ #logo { width: 768px; height: 128px; padding-left: 150px; } /* Navigation */ #navigation { width: 666px; height: 40px; padding-left: 150px; background: url('images/nav.png') repeat-x; } /* Content */ #content { width: 768px; left: 150px; padding-left: 150px; } /* page */ #page { padding-left: 20px; width: 400px; height: 600px; } #page .post { padding: 10px 10px; } /* Sidebar */ #sidebar { background-image: url ('images\sidebar.png') repeat-x; height: 600px; width: 210px; float: right; } /* Footer */ #footer { padding-left: 150px; } /* End Style.CSS */
August 5, 200818 yr Either add one iof the following see which works best for you in your css doc body { background: #FFFFFF; color: #000000; font-family: "Trebuchet MS", Arial, Helvetica; text-size: 0.9em; text-align: center; or right if you prefer or try body { background: #FFFFFF; color: #000000; font-family: "Trebuchet MS", Arial, Helvetica; text-size: 0.9em; float: left; Hope this helps....
August 8, 200818 yr It might help if you do a simple test layout of what you are trying to do first. Start with your wrapper and get your page centred on screen then break your page down into your appropriate sections. i tend to do it as a header area, content area and footer area. and work out what divs i need in each area first and wither it is best to float them right or left. looking at your CSS it looks a little muddled up expecially with the (h2) and (a) in the same area. they are both text editing items so you only really need one. all css is inherant. i tend to not have an actual (a) just sitting in the css but put it with the div like (#header a) which means this will only affect the links that are in the header area and not in the full document. people that use both tend to find that there (a) items go strange sizes as they put it into different area and forget that it takes the text value from both so if its like the text size is 1.0em for the (a) then have it also in the (#header a) with a text size 1.0em the over all size will be different for the (a) inside the header tag to one outside the header tag as it is using the text size 2 times for inside the header tag. its can be a bit hard to understand at first and i dont know if i explained it to well, but when you see how it works and start to understand it, it becomes simple. any questions about it please ask
Create an account or sign in to comment