Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 09-28-2009, 01:02 AM trimming warning
Ultra Talker

Posts: 254
Trades: 0
when i am validating my html page there are no errors but there is a warning which reads

trimming empty <span>



i have removed any white spaces and tabs however i get the same warning, following is my code
=============================
<div class="clip"><a class="popups" href="http://www.website.com/filename.html" title="title" rel="images/Jh2TiTNkz7o.jpg"><span style="float: left; margin: 0 10px 0 0; width:55px; height:41px; background: transparent url(http://website.com/images/sprite1.gif) no-repeat -10px -10px"></span></a><a class="popups" href="http://www.website.com/filename.html" title="title" rel="images/Jh2TiTNkz7o.jpg">Link name</a></div>
=============================

please advice

thanks
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-28-2009, 11:55 AM Re: trimming warning
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Your code contains this:

Code:
<span style="float: left; margin: 0 10px 0 0; width:55px; height:41px; background: transparent url(http://website.com/images/sprite1.gif) no-repeat -10px -10px"></span>
Strip the styling out and it's this:

Code:
<span></span>
That's the empty span it's referring to.

If I remember, the XHTML 1.0 Transitional doctype accepts empty span, whereas Strict doesn't (correct me if I'm wrong, someone).

If you want to stick with your doctype, putting some text in that span will stop the warning. You can put some text in that refers to your background image and move it out of the way by adding 'text-indent: -9999px' to your inline style.

Hope that helps.

Scott.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 09-28-2009, 05:31 PM Re: trimming warning
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Why are you using inline spans in the first place ???
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to trimming warning
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27590 seconds with 12 queries