Afficher un message
Vieux 25/03/2008, 04h01   #6
Jeff
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Standard Module Format

Jeremy wrote:
> Ben C wrote:
>>
>> <snip>
>>
>> Purists will avoid divs that are only there so you can style them but
>> that have no "semantic" meaning but in my opinion that's setting the bar
>> too high.
>>
>> <snip>
>>

>
> A div has no semantic meaning in any case. It's purely structural.
>
> As far as nesting goes, I like to follow a sort of "spatial" standard.
> If I need extra markup to accomplish something visually, I prefer
> nesting rather than adding loose tags; for example, if I need a fancy
> corner on something:
>
> <div class="Module">
> <div class="void">
> <p>Some content</p>
> </div>
> </div>
>
> rather than:
>
> <div class="Module">
> <div class="fancy-corner"></div>
> <p>Some content</p>
> </div>
>
> because I like it when the entire structure of that module - sans any
> styling - collapses into a single spatial box. This is just a personal
> preference, though.


I started off thinking that way, then I tried adding corners that
would go with an existing border and hit the wall (borders can't match
corners). Do you have a method for that? Without the border issue, I
really prefer your method. Perhaps I've missed a "trick".

But the again, combining a background image, such as a gradient, that
goes through the container, with another one positioned differently,
is impossible without nested divs.
>
> Also, when you're looking through the markup, it's much easier to read
> this way (in my opinion) because you can easily see that the extra
> nested div does not add a sub-structure to the module.


I'm not so worried about that because you can mark the div's class in
a way that this is evident. And that bit of html can live on a single
line. I'm not crazy about it, but I don't mind it.
>
> Of course, it's still best to try and minimize extra markup wherever
> possible (this is often an interesting challenge, too).


Well, you could remove it, if it isn't needed. It doesn't bother me so
much because it is so little html. But then, I haven't lived with it
yet... Ideally what I would like is a flexible framework to design with.

Now, I've lived with nested table Dreamweaver html from a designer,
so my bar is lower. After you've read *that* html, this is clarity.

Jeff
>
> Jeremy

  Réponse avec citation
 
Page generated in 0,05910 seconds with 9 queries