scottspinola Posted March 19, 2008 Share Posted March 19, 2008 I am just starting out in CSS so I want to create a valid CSS and XHTML site. My site validates for XHTML 1.0 Strict and CSS 2.1 and it displays just fine in Safari, Firefox, Opera (Mac and Windows) and Camino and Sea Monkey on my Mac. It does not, however, display properly in Internet Explorer 6 or 7. I'm not entirely surprised about that since I know Internet Explorer is a very buggy browser and is not fully compliant.My site is www.scottspinola.com and its stylesheet is www.scottspinola.com/main.cssCan anybody offer suggestions as to how I can make my site display properly across all browsers without invalidating either the CSS or XHTML? I don't think it's a very complex site but, as I said, I'm new to CSS (this is my first site) so I don't even know where to look for an answer. Thanks! Link to comment Share on other sites More sharing options...
jlhaslip Posted March 19, 2008 Share Posted March 19, 2008 In your CSS (main.css), you have specified position:absolute for the sidebar.Change that to float: left and you should be alright.I don't have IE6b available, but the site is pretty basic. Header with horizontal navbar, sidebar, content, etc...Seen this design a thousand times, the float should work fine.Nice, clean site, by the way. I like it.*edit*Validation issues:Because you are using an xhtml strict Doctype, the link and img tags need to be self closing.Change the end angled bracket ( > )to ( /> ) to do the good stuff.Also, add a hash mark ( # ) to the empty anchor for the Home page anchor tag.tTose couple of small things will have the page at 0 errors and 0 warnings. Excellent job for your first CSS site. Congrats. Link to comment Share on other sites More sharing options...
scottspinola Posted March 22, 2008 Author Share Posted March 22, 2008 In your CSS (main.css), you have specified position:absolute for the sidebar.Change that to float: left and you should be alright....Because you are using an xhtml strict Doctype, the link and img tags need to be self closing.Change the end angled bracket ( > )to ( /> ) to do the good stuff.Thanks so much for the great tip! I added the float: left value to the sidebar and the site now displays fine. The self-closing link and img tags were already there, so everything's all set now.I appreciate the help. Link to comment Share on other sites More sharing options...
jlhaslip Posted March 22, 2008 Share Posted March 22, 2008 You are welcome, and that's why we do it... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.