Hi Shane, Well, I don't know if it is okay but I've done it on more than one occasion.
I have noticed that Internet explorer puts a nasty margin on empty divs, that might be something to watch out for.
J
Shane Helm wrote:
I am working on my second CSS & XHTML site. Home page thus far: http://sonze.com/lange/index.html CSS for the page: http://sonze.com/lange/css/master.css
I have some empty div tags to be able to make a graphic a background image since this presentation is common to all pages.
For example in my html:
<div id="header3"></div>
My CSS for "header3"> is as follows: #header3 { position: relative; width: 836px; height: 37px; margin: 0 auto; padding: 0px; background: #2A331F url(../img/header3.gif) no-repeat; }
Since I this is only my second site using Web Standards, I'm unsure if leaving a div tag empty is okay or not. Or is there another method I should be using?
Thank you very much, Shane Helm
****************************************************** The discussion list for http://webstandardsgroup.org/
Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
****************************************************** The discussion list for http://webstandardsgroup.org/
Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************