View Single Post
  #9   Spotlight this post!  
Unread 20-07-2004, 00:10
jonathan lall's Avatar
jonathan lall jonathan lall is offline
Registered User
FRC #2505 (The Electric Sheep; FRC #0188 alumnus)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Toronto, Canada
Posts: 547
jonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond repute
Send a message via MSN to jonathan lall
Re: DIV Tags in Mozilla

Quote:
Originally Posted by maxlobovsky
Jonathan, I'm not sure what you mean by "overuse" of divs and spans. What is overuse? Obviously don't make a page more complicated than you need to display how you want it to, but, if I'm not mistaken, divs and spans are what you are intended to use for positioning in a webpage. Use them (in your CSS, of course) till you get the appearance you like. Correct?
Well, what happens in some cases (and I'm a little bit guilty of this on my team's site) is web authors use divs just to change styles in specific areas, for example to change the font of some selection of text, or to position a paragraph just right when they could have styled another element. Semantically, this is incorrect, as simply enclosing some text in a div and id'ing the div doesn't always mean anything, and is often just an easier way of achieving a look. The way I justify doing that is if the task is impossible, or silly to do "properly", I'll just use a div or span. These are minor infractions.

The true overuse of spans and divs occurs when webdesigners try such presentational things as try to nest them within each other to get rounded corners as background-images for example. Sometimes, instead of defining a paragraph as display: block, they'll enclose it in a div which is by default block-level (which means, basically, it's shaped like a block and doesn't flow around other elements like text does). Sometimes they'll use CSS selectors to define rules around any span in an element
Code:
p span { font-size:larger; }
instead of simple <big> tags, etc.
__________________


Last edited by jonathan lall : 20-07-2004 at 02:26. Reason: big. big. i meant to say big. not large.