Barrett wrote:
> What do you think about controlling a <ul> list levels as seen by the  
> enduser in browser with css padding ?
> I just contemplated this while wrangling with some server side code  
> that builds a list dynamically based on how many records it  sees and  
> whether they are parent or children....
> 
> .firstlevel {padding-left: 1em;}
> 
> .secondlevel {padding-left: 2em;}
> 
> 
> Like this:
> 
> <ul>
>       <li class="firstlevel">Parent One</li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="firstlevel">Parent Two</li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
>       <li class="secondlevel"></li>
> </ul>
> 
> 
When for example a Screenreader tries reading that list, the information 
about levels is lost, in contrary to actually nesting the ul elements. 
Semantically all you have is list with one level, nothing else.

In terms of have a structure that already conveys meaning without 
styling i would regard this as bad practice.

regards, Jens
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to