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
mijenjanje header image sa css-om?

 
Post new topic   Reply to topic    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
dredger



Joined: 26 Apr 2008
Posts: 75

PostPosted: 10.06.2009 13:18    Post subject: mijenjanje header image sa css-om? Add user to your forum ignore list Reply with quote

Pozdrav,

imam jedan site pogonjen Joomlom i dobio sam ideju da mijenjam header
image ovisno o linku na koji posjetitelj klikne (za sada je u headeru
instaliran modul: image rotator, vidi na http://www.thenightexpressband.com).
Kako bi to bilo najjednostavnije napraviti uz pomoć css-a?

I još jedno pitanje: s obzirom da mi je unutar template-a definiran
header part kao id (što je i logično s obzirom da je jedinstveni
element na stranici) da li bi bilo neispravno takvom divu dodjeliti
class a ne id?


Hvala!
Back to top
View user's profile Send private message
Jabba



Joined: 10 Dec 2007
Posts: 326
Location: Rijeka

PostPosted: 10.06.2009 14:53    Post subject: Add user to your forum ignore list Reply with quote

Pa postaviš tu sliku da bude background tog elementa i onda samo sa CSS-om mijenjaš na onoj stranici gdje hoćeš drugu sliku, staviš ID tog elementa na svakoj stranici drugačiji i to je to.

_________________
{COMING SOON!} BenPixel | deviantART | behanceNET
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
darkqueliss



Joined: 27 May 2008
Posts: 1058

PostPosted: 10.06.2009 15:11    Post subject: Add user to your forum ignore list Reply with quote

CSS

Quote:
.blabla {
display: block;
width: 100px;
height: 20px;
background: url("blabla.jpg") no-repeat;
}

.blabla a:hover {
background-position: -100px 0;
}


HTML

Quote:
<div class="blabla">
<a href="#">link</a>
</div>


Samo mjenjaš klase...

Ako ti nije nešto jasno, pitaj...
Back to top
View user's profile Send private message
dredger



Joined: 26 Apr 2008
Posts: 75

PostPosted: 10.06.2009 21:49    Post subject: Add user to your forum ignore list Reply with quote

Jabba wrote:
Pa postaviš tu sliku da bude background tog elementa i onda samo sa CSS-om mijenjaš na onoj stranici gdje hoćeš drugu sliku, staviš ID tog elementa na svakoj stranici drugačiji i to je to.

pa kako u joomli mjenjati id elementa? class može ali id... ja ne znam gdje je to! Confused
Back to top
View user's profile Send private message
dredger



Joined: 26 Apr 2008
Posts: 75

PostPosted: 10.06.2009 21:52    Post subject: Add user to your forum ignore list Reply with quote

xyxjasilixyx wrote:
CSS

Quote:
.blabla {
display: block;
width: 100px;
height: 20px;
background: url("blabla.jpg") no-repeat;
}

.blabla a:hover {
background-position: -100px 0;
}


HTML

Quote:
<div class="blabla">
<a href="#">link</a>
</div>


Samo mjenjaš klase...

Ako ti nije nešto jasno, pitaj...


čekaj, imam 9 linkova a div-u id određuje da je pozadina logo.png... kako definirati da:
kad klikne na link1 pokaže za pozadinu image1.jpg
kad klikne na link2 pokaže za pozadinu image2.jpg
.
.
.
kad klikne na link9 pokaže za pozadinu image9.jpg
Back to top
View user's profile Send private message
darkqueliss



Joined: 27 May 2008
Posts: 1058

PostPosted: 10.06.2009 22:00    Post subject: Add user to your forum ignore list Reply with quote

Čekam... Very Happy

Onda na tu stranicu na koju ode kad klikneš link, dodaš drugi id kojem odrediš u cssu img bg koja slika da se prikaže...

...ak sam te dobro razumio...
Back to top
View user's profile Send private message
dredger



Joined: 26 Apr 2008
Posts: 75

PostPosted: 10.06.2009 22:08    Post subject: Add user to your forum ignore list Reply with quote

xyxjasilixyx wrote:
Čekam... Very Happy

Onda na tu stranicu na koju ode kad klikneš link, dodaš drugi id kojem odrediš u cssu img bg koja slika da se prikaže...

...ak sam te dobro razumio...


Ne mrdaj!!! Razz

Riječ je o Joomli koja koristi uvijek jedan file.css a linkom mogu elementima glavnog sadržaja pridodavati class... ali taj class se ne primjenjuje na ostale divove, samo na main content!
Back to top
View user's profile Send private message
dredger



Joined: 26 Apr 2008
Posts: 75

PostPosted: 10.06.2009 22:17    Post subject: Add user to your forum ignore list Reply with quote

sve mi se čini da sam trebao ovaj thread staviti na Server side... Shocked
Back to top
View user's profile Send private message
darkqueliss



Joined: 27 May 2008
Posts: 1058

PostPosted: 10.06.2009 22:18    Post subject: Add user to your forum ignore list Reply with quote

A trebas na ostale divove ili na taj na koji mozes dodat klasu?

...jbg tu ti nemogu pomoc...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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