Reply LinkBack Thread Tools Search this Thread
Old 20-06-2008, 10:52   #1 (permalink)
KrisMarissens
or just Kris
 
Join Date: Jun 2005
Location: Brussels - Belgium
Posts: 119
Having a server control render standards compliant html

Hi,

I'm having to assist someone to alter the output of a serverside control (.NET).
I'm still not 100% sure about the following bit: there is a part where the control - more specifically a paged list using alphanumeric characters - renders these anchors starting with a "previous" anchor that is grayed out (being at the start and all).

The problem is they are using a property "disabled" inside the anchor <a disabled="disabled"> and to my knowledge the disabled attribute can only be used with form elements (input).

In order to be able to style the anchor list I thought rendering of the grayed out anchor could be:

1.
<a class="disabled">PreviousText</a>

2.
<span class="disabled">PreviousText</span>

3.
PreviousText

Which do you think would be best considering the least amount of generated html but allowing enough room for DOM traversing and styling using css?


Thanks a lot.
Kris
  Reply With Quote
Old 20-06-2008, 11:32   #2 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
You're right. I'd go with #2 - it adds styling options and gives a touch of semantic meaning to the markup.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8