Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
Div class vs id

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
Cozmika



Joined: 15 Aug 2007
Posts: 292
Location: Somewhere in my World

PostPosted: 14.06.2008 08:18    Post subject: Div class vs id Add user to your forum ignore list Reply with quote

Imam malo problema sa standardima no...

Vidim da skoro sve stranice danas imaju div class a ne div id... Zašto? Zašto je class bolji? Kad je bolje upotrijebiti class kad id....?

_________________
www.cozmika.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger Twitter profile
KAMI



Joined: 14 Oct 2006
Posts: 100

PostPosted: 14.06.2008 08:52    Post subject: Add user to your forum ignore list Reply with quote

Id je jedinstven znači možeš ga dati jednom elementu, dok se class može upotrijebit na više elemenata, tj više puta.
Obadvoje je ispravno samo ovisio o potrebi gdje ćeš koji upotrijebit.

Npr na stranici ćeš vjerojatno imati samo jedan header ili navigaciju to znači onda možeš izvesti s id, a class ćeš upotrijebiti za neke elemente koji se više puta ponavljaju na stranici, tipa imaš neki box koji će poslužiti za news, contact itd.
Back to top
View user's profile Send private message
Cozmika



Joined: 15 Aug 2007
Posts: 292
Location: Somewhere in my World

PostPosted: 14.06.2008 10:33    Post subject: Add user to your forum ignore list Reply with quote

Ahaaa...

Dakle nije grijeh negdje dati id makar može i class?

_________________
www.cozmika.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger Twitter profile
KAMI



Joined: 14 Oct 2006
Posts: 100

PostPosted: 14.06.2008 10:37    Post subject: Add user to your forum ignore list Reply with quote

Dakle class možeš dati uvijek, id je unique i ako isti upotrijebiš na više elemenata html ne prolazi validaciju.
Back to top
View user's profile Send private message
Cozmika



Joined: 15 Aug 2007
Posts: 292
Location: Somewhere in my World

PostPosted: 14.06.2008 12:39    Post subject: Add user to your forum ignore list Reply with quote

KAMI wrote:
Dakle class možeš dati uvijek, id je unique i ako isti upotrijebiš na više elemenata html ne prolazi validaciju.


E hvala... Sad mi j jasno

_________________
www.cozmika.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger Twitter profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group