CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 20th, 2004, 09:25 AM
DEfusion DEfusion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 288 DEfusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 26 m 45 sec
Reputation Power: 6
CSS skin or Content (semantic markup question)

I'm in the middle of doing a site conversion to xHTML and CSS using semantic markup,

Lets say I have something which needs a rating displayed in stars...

E.g. if the current html is :

Code:
<h1>Book Name</h1>
<img src="star.gif"><img src="star.gif"><img src="star.gif"><img src="star.gif">


I'd like...

Code:
<h1>Book Name</h1>
<h2>4 Stars</h2>


And do some image replacement on this when skinning the site... what do you think?

-D

Reply With Quote
  #2  
Old April 29th, 2004, 04:02 AM
dustyreagan's Avatar
dustyreagan dustyreagan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Austin
Posts: 126 dustyreagan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 40 m 3 sec
Reputation Power: 5
hmm... that's a tough call. I'd probably just use the img tags.
Talking semantics the argument would be that star images aren't a heading and thus shouldn't use the h2 tag.

But I can see how your alternative might be pretty cool… especially if you make it so that is says "4 Stars" when images are turned off. When it says "4 Stars" it does seem appropriate to use the h2 tag.

In any case, I'd like to see how you do the image replacement on the h2 tag. Maybe post the site up here when you finish the conversion.

Good luck on your conversion.
__________________
DustyReagan.com

Reply With Quote
  #3  
Old April 30th, 2004, 04:07 AM
DEfusion DEfusion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 288 DEfusion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 26 m 45 sec
Reputation Power: 6
Thanks dude.

I eventually went with the image replacement technique for a couple of reasons.

Firstly like you say the title & content now display 4 Stars instead of star star star star when the page fails gracefully.

However due to the general image replacement problem when images are turned off the text content does not show. I've looked at all the image replacement options and choose the text indent option. (You set the text-indent to a very high negative value)

Secondly we have an affiliate system and although at the moment no affiliates have said "can you change the stars on our pages to these instead" as yet, I'm sure that they will, and if/when they do replacing them in their specific CSS skin file will be better than writing new XHTML markup for them.

-D

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS skin or Content (semantic markup question)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT