3 ms·
"I am using a large number of div tags within the website (previously it was completely tables based)." That's one part of the problem. Why not use tables if yo
by tintin 16y ago
"I am using a large number of div tags within the website (previously it was completely tables based)." That's one part of the problem. Why not use tables if you are using .title, .body and .footer for DIVs when tables have this as default?
I see a lot of people using DIVs on places they shouldn't. They use things like <div class="title" ... Why not use H1 - H6 instead?
HTML tags provide structure. Structure means less complexity. Using only DIVs will get you into CSS trouble.
Edit: A good tip: your website will look more consistent and clean when you try to build your pages by only declaring HTML tags in your CSS at first. Only when there is no other solution declare classes and IDs. And even then remember you can use multiple classes in your class attribute. Things like: class="width50perc floatLeft textAlignRight textColor1" are very handy.
- notJim 16y ago> Things like: class="width50perc floatLeft textAlignRight textColor1" are very handy. At that point, how is this any different from just using inline styles? The whole point of CSS is to separate presentation from content, you've done gone and thrown a bunch of presentation back into it.
- tintin 16y agoTrue, but I think the fun thing is when you use CSS to seperate presentation from content you will end up in CSS hell. I know websites like csszengarden are telling you this is the power of CSS. And it is, but ask yourself: how many times did you change the layout of a website with CSS only? Probably not a single time.