Thank you Gunlaug, I'm quite new to css and had to read your comments
several times before they even began to sink in!
I chose the current Doctype largely out of ignorance but also because I
believed that browsers would be more tolerant of bad/incorrent css
coding - the word 'strict' made me run a mile!
It probably won't be until Sunday until I have time to implement your
suggestions (and read up on exactly what it is I'm doing), and although
it does appear obvious, I would just like to make sure that deleting
div#sideBar{width:100%;} and then adding div#sideBar{display:
table;zoom:1;} will be ok?
Finally, if a url is declared will this slow down page loading while the
browser accesses the document? I imagine it would be negligible under
most circumstances but what happens if the page isn't available?
Thanks again,
John Latter
Gunlaug Sørtun wrote:
John Latter wrote:
http://evomech2.blogspot.com/2006/02/re-evomech-re-peer-review-and-genetic.html
The first problem (which occurs on Firefox but not IE6) can be seen
at the bottom of the above page where the sidebar text overflows
into main content area. I have tried to fix it myself but with many
other things to do I'm really stumbling about in the dark.
IE6 will render in quirks mode with the Doctype you have now. Use a
Strict and complete DTD[1] instead and get standard mode in all browsers
- unless you want the box-model differences you have now.
This should do...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
The difference in how IE6 and Firefox line sidebar vs the floating main
content area, is caused by a bug in IE/win, called 'Layout'[2].
This...
div#sideBar{width:100%;}
...acts as a 'hasLayout' trigger in IE/win. Delete it and IE6 will
render like Firefox (once the DTD is corrected).
In case you want all browsers to render like IE6 does now, then the most
reliable way to make standard compliant browsers create a 'new block
formatting context'[3] is to add...
div#sideBar{display: table;}
...once the width is removed. That'll make Firefox and other good
browsers render a nicely contained block in accordance with CSS standard.
In order to get IE6 back on track you'll have to add a new 'hasLayout'
trigger since IE/win doesn't understand CSS standards like the other
browsers do. This 'non-standard' addition is the most future safe one...
div#sideBar{zoom: 1;}
A bit back and forth there, but most of it is caused by IE6 bugs and
lack of standard compliance. The result will be good.
I'm not riding ponies when dealing with IE/win ;-)
regards
Georg
[1]http://www.w3.org/QA/2002/04/valid-dtd-list.html
[2]http://www.satzansatz.de/cssd/onhavinglayout.html
[3]http://www.w3.org/TR/CSS21/visuren.html#q15
--
*Model of an Internal Evolutionary Mechanism*:
http://members.aol.com/jorolat/index.html
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************