kdubbie
20 Jul 2010, 10:22 AM
Hello,
I have a kind of stupid general css/html question, and I'm sure it's a matter of preference...but I'd like to hear other's opinion...
I am creating part of a webpage that has 3 div sections sitting side-by-side. Each section will look exactly the same with the only difference being the copy and an icon.
So my question is, is it preferable to have more HTML (or in other words create more nested divs) and less CSS, or have less HTML (have less nested divs or none at all) and more CSS...keeping in mind that they will look exactly the same whichever way you do it....
To me, having less HTML seems more organized, so that all you have to do is worry about the style sheet, but perhaps having more nested divs and less css is better for other reasons??...I see it all the time, parts of webpages that use 4 or 5 levels of nested divs and always wonder why when they could have simply done 2 and achieve the same effect.
Anyways, just curious here...I just assume it's a matter of prefernce, but I also like the idea of standardizing my HTML and CSS coding as much as possible.
Thanks a lot.
I have a kind of stupid general css/html question, and I'm sure it's a matter of preference...but I'd like to hear other's opinion...
I am creating part of a webpage that has 3 div sections sitting side-by-side. Each section will look exactly the same with the only difference being the copy and an icon.
So my question is, is it preferable to have more HTML (or in other words create more nested divs) and less CSS, or have less HTML (have less nested divs or none at all) and more CSS...keeping in mind that they will look exactly the same whichever way you do it....
To me, having less HTML seems more organized, so that all you have to do is worry about the style sheet, but perhaps having more nested divs and less css is better for other reasons??...I see it all the time, parts of webpages that use 4 or 5 levels of nested divs and always wonder why when they could have simply done 2 and achieve the same effect.
Anyways, just curious here...I just assume it's a matter of prefernce, but I also like the idea of standardizing my HTML and CSS coding as much as possible.
Thanks a lot.