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
css background-color

 
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
Milos Radovic



Joined: 18 Mar 2004
Posts: 52
Location: St. Gallen - Switzerland

PostPosted: 17.01.2005 19:31    Post subject: css background-color Add user to your forum ignore list Reply with quote

kako da resim sledeci problem.

na stranici www.superdeluxe.ch koristim class .sub_on za markiranje aktuelne stranice.
Znaci... Ako se nalazim na stranici home, link za home u navigaciji ima class sub_on. Class je definisam ovako

.sub_on{
font-weight: bold;
margin-left: 20px;
background-color: #00CCFF;
}

Problem je seldeci. Browser preuzima sve sem background-color'a!! zasto?!??!
Pokusavao sam na razne nacine da resim problem. Dzabe! Nazalost nevidim problem.

Navigacija je jedostavno resena obicnim linkovima koji imaju background-color, display: block; etc. Hover radi kako treba. Samo eto nemogu da "markiram" stranicu t.j. link na kome se nalazim!

CSS imate ovde --->

HERE

A stranica je --->

www.superdeluxe.ch

Sad

_________________
www.superdeluxe.ch
suzuki in design
milos raovic
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 17.01.2005 19:42    Post subject: Add user to your forum ignore list Reply with quote

Dodaj !important na .sub_on background-color rule.

Ovako:
Code:
background-color: #00CCFF !important;

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Milos Radovic



Joined: 18 Mar 2004
Posts: 52
Location: St. Gallen - Switzerland

PostPosted: 17.01.2005 19:56    Post subject: Add user to your forum ignore list Reply with quote

wow! kad pre.? Surprised)
radi!! hvala...

a kako? mislim.. sta mu to doje? u cemu je fora?

_________________
www.superdeluxe.ch
suzuki in design
milos raovic
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 17.01.2005 20:15    Post subject: Add user to your forum ignore list Reply with quote

fora je u tome da imaš sivi background specificiran za link 'button', a za isti određene klase (sub_on) specificiraš isti attribute (background) na drugu vrijednost, ali css zapamti onu prvu

dodavanjem keyworda "!important" činiš to da proglasiš da prethodni attribute, tj. njegova vrijednost pregazi sve druge vrijednosti na istom elementu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
red



Joined: 03 May 2004
Posts: 919
Location: Zabok

PostPosted: 17.01.2005 20:39    Post subject: Add user to your forum ignore list Reply with quote

Al kad smo kod !importanta, čika Jakob kaže:

Quote:
Do not use the !important attribute to override the user's settings. It is hard to imagine cases where you are justified in ignoring the user's preferences if the user felt strongly enough to use his or her own !important rating, so !important should be reserved for user style sheets.

_________________
Get busy living, or get busy dying.
Back to top
View user's profile Send private message Visit poster's website Twitter profile
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 17.01.2005 21:07    Post subject: Add user to your forum ignore list Reply with quote

IMHO, da je !important rezerviran iskljucivo za user stylesheetse, i da je jedino za to zamisljen, ne bi uopce radio kad ga se pozove iz necega sto nije user style sheet (niti bi bio implementiran u author style sheetove).

http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules

U CSS-u 2, !important definiran u author style sheetu nikako ne moze pregaziti user style sheet. Čika Jakobova priča vrijedi samo ukoliko se promatra iz perspektive CSS1 specifikacije.

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
red



Joined: 03 May 2004
Posts: 919
Location: Zabok

PostPosted: 17.01.2005 21:14    Post subject: Add user to your forum ignore list Reply with quote

Imaš pravo. Alertbox gdje govori o ovom je iz davne 1997.

_________________
Get busy living, or get busy dying.
Back to top
View user's profile Send private message Visit poster's website 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