http://www.perlmonks.org?node_id=144976


in reply to We Stylin'!

Personally I think DIV tags are almost certainly not the way to go, at least not for nodelets or anything else already in a container. For things that exist in container elements classes (class=nodelet) and ids (id=poll) ought to be more than sufficient.

--
perl -pe "s/\b;([st])/'\1/mg"

Replies are listed 'Best First'.
Re: Re: We Stylin'!
by AidanLee (Chaplain) on Feb 12, 2002 at 21:54 UTC

    I'd actually have to disagree. While I've mangled more than a few tables in my day for nefarious "visual layout" purposes, div tags are truer to the purpose, are more flexible for styling, and create far less cluttered code. I'd love to see (and would even volunteer a bit of time to help out) perlmonks worked over in properly id'd/classed divs & spans.

      I think perhaps you must misunderstand me. Yes DIV and SPAN are by far the best tools for clustering content in a general application. But this is not a general application, we have pre-existing container elements (nodelets) which will not be disappearing, and so it seems it would be most effecient to refer to these than add addiotional elements.

      --
      perl -pe "s/\b;([st])/'\1/mg"

        Ah, I see I did misunderstand. My appologies

        Yes, we should definitely take advantage of labeling the existing container classes. The issue I see is popping open the source code to the page is that these container classes aren't implemented as containers. There just a few table cells here and there. Nodelets aren't even their own tables, but rather table rows in the larger table. I'd love to see something like:
        <div id="main" > <div id="node_content"> </div> <div id="node_replies"> ... </div> </div> <div id="sidebar"> <div id="nodelet_xp"> </div> <div id="nodelet_chatterbox"> </div> ... </div>