Hi there. I'm wondering if someone might be able to let me know what I'm doing wrong here? PLEASE! I've been teaching myself how to lay out web pages in CSS rather than tables (I'm a freshie!) and I've hit a snag. I'm trying to get my sidebar div to sit to the right of my mainContent div with the footer below. I've been using negative margins but it just isn't happening. I've uploaded this initial draft page http://www.macmastersplumbing.com.au (with inline CSS, dummy text and no linked pages). If someone could point out where I'm going wrong, I'd be stoked! It's been doing my head in. The content copy is running underneath (as in covered by) the sidebar in Safari and doesn't show up at all in Firefox. God knows what it's doing in IE. Thanks!
<!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\"> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /> <title>Central Coast Bathroom Renovations and Plumbing | MacMasters Beach Plumbing</title>
<div id=\"mainContent\"> <p><img src=\"images/towelhead.jpg\" width=\"520\" height=\"245\" /></p> <h2>MacMasters Beach Plumbing & Bathroom Renovations</h2> <p>Are you looking for a plumber you can trust to do the job right, the first time and that won't cost a fortune? Whether it's a quality bathroom renovation or simply clearing a blocked drain, MacMasters Beach Plumbing & Bathroom Renovations are here to help. We are highly experienced tradespeople who take pride in our work and deliver only the best quality jobs time and again. With over 15 years of experience, we know which products work and last. We can advise you with the design of your bathroom renovation project to help you make the right decisions and create a bathroom you're delighted with. Call or <a href=\"mailto:info@macmastersplumbing.com.au\">email us</a> for an obligation free quote. </p> </div>
<div id=\"sidebar\"> <h2>10 tips for great bathroom renovation RESULTS</h2> <p>Are you looking for a plumber you can trust to do the job right, the first time and that won't cost a fortune? Whether it's a quality bathroom renovation or simply clearing a blocked drain.</p> <h2>BATHROOM TRENDS</h2> <p>Are you looking for a plumber you can trust to do the job right, the first time and that won't cost a fortune? Whether it's a quality ba</p> <h2>Testimonials</h2> <p>Are you looking for a plumber you can trust to do the job right, the first time and that won't cost a fortune? Whether it's a quality ba</p> <h2>Resources</h2> <p>Are you looking for a plumber you can trust to do the job right, the first time and that won't cost a fortune? Whether it's a quality b</p> <p><a href=\"mailto:info@macmastersplumbing.com.au\"><img src=\"images/calculator.jpg\" alt=\"contact us\" width=\"220\" height=\"104\" /></a></p> </div>
<div id=\"footer\"> <p><a href=\"#\">BATHROOM RENOVATIONS</a> | <a href=\"#\">PLUMBING</a> | <a href=\"#\">METAL ROOFING</a> | <a href=\"#\">GALLERY</a> | <a href=\"#\">TESTIMONIALS</a> | <a href=\"#\">LINKS</a> | <a href=\"#\">CONTACT</a> | <a href=\"#\">HOME</a></p> <p>Call Geoff on 0418 487 827 or email us at <a href=\"mailto:info@macmastersplumbing.com.au\">info@macmastersplumbing.com.au<br /> </a>563 The Scenic Rd, MacMasters Beach NSW 2251 | Licence #56267c</p> <hr /> <br /> <p>SERVICING ALL AREAS OF THE CENTRAL COAST INCLUDING: </p> <h5>Alison, Avoca Beach, Bar Point, Bateau Bay, Bensville, Berkeley Vale, Blackwall, Blue Bay, Blue Haven, Booker Bay, Budgewoi, Buff Point, Calga, Canton Beach, Chain Valley Bay, Charmhaven, Chittaway Bay, Chittaway Point, Copacabana, Daleys Point, Davistown, Dooralong, East Gosford, Empire Bay, Erina, Erina Heights, Ettalong, Ettalong Beach, Forresters Beach, Fountaindale, Glenning Valley, Gorokan, Gosford, Green Point, Gunderman, Gwandalan, Hamlyn Terrace, Holgate, Jilliby, Kanwal, Kariong, Killarney Vale, Killcare, Kincumber, Kincumber South, Koolewong, Kulnura, Lake Haven, Lake Munmorah, Lisarow, Long Jetty, Macmasters Beach, Mangrove Mountain, Mannering Park, Mardi, Matcham, Narara, Niagara Park, Norah Head, Noraville, North Avoca, North Gosford, Ourimbah, Patonga, Pearl Beach, Picketts Valley, Point Clare, Point Frederick, San Remo, Saratoga, Shelly Beach, Somersby, Spencer, Springfield, St Huberts Island, Summerland Point, Tacoma, Tascott, Terrigal, The Entrance, The Entrance North, Toowoon Bay, Toukley, Tuggerah, Tumbi Umbi, Umina, Umina Beach, Wadalba, Wamberal, Warnervale, Watanobbi, West Gosford, Woongarrah, Woy Woy, Wyoming, Wyong, Wyongah and Yarramalong.</h5> <h5>Site by <a href=\"http://www.chorusdesign.com\">Chorus Design</a></h5> </div>
I've been teaching myself how to lay out web pages in CSS rather than tables (I'm a freshie!) and I've hit a snag. I'm trying to get my sidebar div to sit to the right of my mainContent div with the footer below. I've been using negative margins but it just isn't happening. I've uploaded this initial draft page http://www.macmastersplumbing.com.au (with inline CSS, dummy text and no linked pages). If someone could point out where I'm going wrong, I'd be stoked! It's been doing my head in. The content copy is running underneath (as in covered by) the sidebar in Safari and doesn't show up at all in Firefox. God knows what it's doing in IE. Thanks!
Secondly, most of the problems are coming from your commenting. html comments should look like this:
And finally give #mainContent a width in px.