John Latter wrote:
Thank you Gunlaug, I'm quite new to css and had to read your comments
several times before they even began to sink in!
:-)
...and I've just started ;-)
Just take your time and get the basics right from the beginning. Much
easier to "kill" browser-bugs and work around lack of standard-support
when your html/CSS is good to begin with.
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!
The choice of Transitional vs. Strict DTD doesn't affect tolerance
towards CSS - only html. A few less visitor-friendly and/or purely
presentational html elements are not accepted as part of Strict. The
html validator will tell you which ones...
If you want a _just a little_ bit of tolerance, then just avoid using an
xhtml DTD until you know the _whole_ difference between html and xhtml.
That may take some time, so just use HTML 4.01 Strict for now, and make
sure the source-code is all valid.
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?
That is OK in that it will be working in all browsers that follow
CSS2/2.1 ( they will use 'display: table'[3] ), and IE6/IE7 ( that'll
use 'zoom:1;'[2] ).
The Microsoft-style 'zoom:1;' needed will be flagged as a
proprietary/non-standard piece of CSS, and you either have to accept
that "flag" or hide that bit of style from the CSS validator by using a
'conditional comment'[4].
I personally don't care about hiding something like this since it is
just ignored by the good browsers anyway, but that's just me - I guess :-)
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?
Browsers will not really check your source-code/DTD against the relevant
html standard on the W3C site, so no slow-down at all. Nothing to worry
about there.
The browsers have the basics of all valid DTDs "hardwired", and will
just check which DTD you are using, and see if they can recognize it
(correct spelling and all that...). The decision to 'switch'[5] or not
is then made.
Note that some browsers will switch on incomplete DTDs, while others
will not. Complete DTDs will work most consistent across browser-land -
as they should.
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
[4]http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/ccomment_ovw.asp
[5]http://www.communitymx.com/content/article.cfm?cid=85FEE
--
http://www.gunlaug.no
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************