On Mon, 9 Feb 2009, Gerard Hynes (Gmail) wrote:

I'm all for semantic mark up and removing redunant tags, but the
reality is supporting older browsers and browser quirks complicate
things. So, yes definitely prefer CSS overflow solution, to adding a
redundant/meaningless tag.

   How can CSS overflow replace <div style="clear:both;"></div>?


In the perfect world people would use the latest standards compliant
browsers and keep them regularly updated. Spread the word!

On Mon, Feb 9, 2009 at 12:57 PM, Ben Lau <bensan...@gmail.com> wrote:
Haha, thanks. But I also do appreciate the long answers though; thanks
Benjamin.

I've read on numerous blogs/tutorials/comments that having blank div is poor
practice, and that it's also poor semantic markup because it's meaningless.

I mention the javascript alternative because i'll be using these empty divs
purely for decorative purposes, so if non-javascript can't see the yellow
block that goes 9999em to the left of my website, I'm not that concerned.
I'm just worried about screen readers picking up that empty div.

So then you guys have no problem in using it for clearing as opposed to
overflow:hidden/auto?

On Mon, Feb 9, 2009 at 1:50 PM, Anthony Ziebell
<anth...@fatpublisher.com.au> wrote:

If you use a tool such as tidy html in xhtml mode it will delete your
empty tags... probably a setting to turn that feature off, but something to
think about...

Cheers,
Anthony.

Gerard Hynes (Gmail) wrote:

My advice below. Cheers, Gerard

On Mon, Feb 9, 2009 at 9:33 AM, Ben Lau <bensan...@gmail.com> wrote:


Hi all,

Are there any (seriously) bad implications of having empty DIVs around
your
HTML document? I try to avoid using them personally, but there are cases
where the visual design has forced me to add empty divs (or spans) just to
achieve the look.
Apart from adding extra weight and cluttering the document, I understand
screen readers do not pick up divs and spans?


I'm not expert about screen readers, but I did run a site I upgraded
through JAWS with some interesting results. The site had alot of
<p>&nbsp;</p> due to the CMS they were using and JAWS would translate
this to/speak out "blank" which wasn't ideal. Am not sure if it would
do the same for <p></p> or <div></div> or <div />.



Would I be better off to insert these meaningless decorative tags using
javascript and modifying the DOM, while non-javascript users would see a
more cut down version of the design? Do screen readers pick up javascript
and events?


Javascript solution could work, but I would run your page through a
screen reader first and see if you're happy with the result. You can
download demo of JAWS from
http://www.freedomscientific.com/products/fs/jaws-product-page.asp

You'll probably identify other areas of content that could be improved
for screen readers. He's a good article about the topic
http://www.webaim.org/techniques/screenreader/

--
   Chris F.A. Johnson, webmaster         <http://woodbine-gerrard.com>
   ========= Do not reply to the From: address; use Reply-To: ========
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to