/    Sign up×
Community /Pin to ProfileBookmark

Too many DIV’s?

Ok I read this article on A List Apart and it kind of made me feel like I was using too many div’s in my markup. Heres my site tell me what your opinion is. Could I achieve the same look with less divs?

[url]http://www.spaodesigns.com/www/Today/index.html[/url]

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@XeelNov 22.2006 — yep, [URL=http://www.w3.org/TR/WCAG10/]WCAG[/URL] ([URL=http://www.w3.org/WAI/]WAI[/URL]) says to use tables when it comes to structural formatting, but each cell have to contain some info. And when it comes to grafical formatting divs are quite good. Let's see you could put a table here, by the top containing the top menu. Two cells for the main part, one containing all the text, another your forms and promotions by the the right border. And finally at the bottom containing all the commercial and technical info about the website. The rest looks fine...
Copy linkTweet thisAlerts:
@novemberGreyauthorNov 22.2006 — really? I should use tables? I've been trying to stay away from them.
Copy linkTweet thisAlerts:
@Jeff_MottNov 22.2006 — No, you shouldn't. The WCAG that Xeel referenced explicitly refers to tables for layout as a misuse of markup and something to be avoided [[url=http://www.w3.org/TR/WCAG10/#gl-structure-presentation]1[/url]]. Tables are for tabular information; menus, generic content, promotions, and technical info certainly do not constitute tabular information. Xeel may have referenced the WCAG, but his/her recommendations are the direct opposite.

novemberGrey, your DIVs seem fine, but your HTML markup needs more structure. The HTML validator can read the markup to provide an outline of the page. [url=http://validator.w3.org/check?uri=http%3A%2F%2Fwww.csszengarden.com&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1#outlineresult]Here is the genereated outline from CSS Zen Garden.com[/url], and [url=http://validator.w3.org/check?uri=http%3A%2F%2Fwww.spaodesigns.com%2Fwww%2FToday%2Findex.html&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1#outlineresult]here is your outline[/url]. What you need to do is build a page that makes sense, but without any styles and without any pictures. After you have a logical HTML document, [i]then[/i] proceed to use CSS to add styles and graphics.
Copy linkTweet thisAlerts:
@innomindsNov 22.2006 — Out of the two...div tags and tables...which could be more user-friendly for search engines?
Copy linkTweet thisAlerts:
@Jeff_MottNov 22.2006 — Neither element is necessarily favorable to search engines. But building your page using the structural HTML approach, from which the use of DIVs follow, is what will be search-engine friendly.
Copy linkTweet thisAlerts:
@novemberGreyauthorNov 22.2006 — Thankyou for your help Jeff.
Copy linkTweet thisAlerts:
@innomindsNov 23.2006 — Neither element is necessarily favorable to search engines. But building your page using the structural HTML approach, from which the use of DIVs follow, is what will be search-engine friendly.[/QUOTE]

I was a bit confused earlier. Thanx [B]Jeff [/B] for the info.
Copy linkTweet thisAlerts:
@abzNov 23.2006 — The way I set out my divs (usually), is I do a small sketch of what I want the pages to look like. Any re-occuring chunks, I see (such as titles, navigation) I draw on a box. One for the content maybe, and another two boxes inside the content fo r columns or whatever.

This gives me a visual or the basic chunks of my site. Yes, I often add more divs, but try not to. Remember a div is a division, so think of it logically, and work out if that extra div really is a seperate division or not.
×

Success!

Help @novemberGrey spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...