Div explosion

Giganews Newsgroups
Subject: Div explosion
Posted by:  Duncan Idaho (dunc…@dunenoemail.com)
Date: Fri, 27 May 2016

Hello again

I'm sitting here refactoring the UI for the mobile device interface for my commercial website and realized
quite out of the blue that my behavior has changed. All of a sudden I'm wrapping everything in a div
[Inline styles used for illustration purposes, even though I think they're naff.]

Before this strange transformation I would do something like this

<div id="maincontainer" style="padding:10px">

    <h1>blah blah blah</h1>

    yadda yadda yadda etc

    <ul><li>...etc

    yadda yadda yadda etc

</div> <!-- end #maincontainer -->

Now, almost without realizing it I'm doing this

<div id="maincontainer">

    <div ...>
        <h1>blah blah blah</h1>
    </div>

    <div style="...">
    yadda yadda yadda etc
    </div>

    <!-- slightly worryingly -->
    <div ...>
        <ul><li>...etc
    </div>

    <div ...>
        yadda yadda yadda etc
    </div>

</div> <!-- end #maincontainer -->

It now seems to me to be 'messy' and wildly out of my control just leaving blocks of text and elements floating around
between <html> ... </html> and I like the control that <div> gives me.

There has to be an interpreter overhead involved in interpreting these additional elements
but I have no idea how to test for this at the moment although chrome tools has some interesting things that need further
investigation.

That aside, what reason could there be 'not' to wrap everything in micro-granularity divs.

As ever I'd be interested in your thoughts

Idaho

--
Duncan Idaho
!(ghola mentat)

Replies