View Single Post
Old 12-22-2008, 09:12 PM  
Azlord
Confirmed User
 
Azlord's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: City... City of Satan
Posts: 2,651
Quote:
Originally Posted by brandonstills View Post
Strict is not strict. Why can't I do <iframe/> or <script src="..."/> without the browser crapping out on me?

Another good one. Don't do display: none in the css if you want to change it with JS later on. Do it inline on the actual element. You can't change it since it's not on the DOM if you declare it none in the CSS.
You can do script with strict, but you can't do iframe. That's not a standards valid markup...

And your point about using display: none; inline is a good tip. And display: none; is better than visibility: hidden; hidden seemed to leave the space that the hidden element took up on the page, but display none, removes that space and continues the normal flow of the document.
Azlord is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote