DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Design

Reply
 
Thread Tools Display Modes
Old 04-03-2009, 04:52 AM   #11
iamback
Member
 
iamback's Avatar
 
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
Default

Quote:
Originally Posted by dacoyle View Post
<span> without an attribute is empty. Some validators flag that, so it's part of our requirements.
Sorry, but that's bullshit. An element is empty when it doesn't have content - by definition. That's how HTML works. Some elements are allowed to be empty, others are not. Also, an element that does not have content but does have attributes, is still empty.

But in this case the span would not be empty since it would have content! And you can style it the same way as you style the corresponding a tag: by using a contextual selector (starting off the menu ul element). Adding an attribute is just code bloat since it isn't needed.

Quote:
Sorry I can't cite specifics, but we don't allow <div> or <span> without attributes.
Please tell your bosses that a) they misunderstand the HTML specs; b) their rules cause unnecessary code bloat and c) any validator that flags a span with content and without an attribute is wrong: that's a bug that should be reported - until that bug is fixed, don't trust the validator. By all means, don't allow empty (really empty) elements that are not allowed by the standard to be empty (no matter how many attributes they have). But redefining "empty" is just silly and counter-productive.

And if you really need to conform to these silly rules, why not just add a class attribute to the span?

FYI, both div and span elements are allowed to be empty, and neither requires any attribute at all: 7.5.4 Grouping elements: the DIV and SPAN elements

   
__________________
Marjolein Katsma
Look through my eyes on Cultural Surfaces (soon!), My ArtFlakes shop and Flickr.
Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog
iamback is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vertical Text in InDesign Ashlie Print Design 4 09-17-2008 02:47 PM
CSS vertical text positioning dacoyle Web Design 8 06-12-2008 05:56 PM
Lists for nav — semantic logic? ktinkel Web Design 28 06-26-2006 05:53 PM
CSS vertical navigation bar dthomsen8 Web Site Building & Maintenance 10 03-14-2006 06:41 AM
Fetch shortcut lists annc Web Site Building & Maintenance 14 04-16-2005 01:10 AM


All times are GMT -8. The time now is 08:22 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.