Changing template icon to represent viewing page

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
knuckles

Changing template icon to represent viewing page

Post by knuckles »

Hi,

Can any one let me know an easy way to change a css class within a template without making multiple templates. What I am trying to achieve is to change an icon to represent the page you are viewing.

In the template I am calling:

         
                   
              crappy quote!              
       
           
and my css looks like this

#banner .home { background: url(../uploads/images/ico_m_house.jpg) no-repeat }
#banner .about { background: url(../uploads/images/ico_m_people.jpg) no-repeat }
#banner .contact { background: url(../uploads/images/ico_m_paper.jpg) no-repeat }

Mind is at a bit of a blank at the moment.
Thanks
User avatar
chead
Forum Members
Forum Members
Posts: 63
Joined: Tue Feb 06, 2007 4:01 am

Re: Changing template icon to represent viewing page

Post by chead »

How about something like:



You could also do something like:



which would save you the trouble of defining all the classes.
knuckles

Re: Changing template icon to represent viewing page

Post by knuckles »

Thanks for that.

I was unaware of what variables were available and have since found out the {get_template_vars} command.

Cheers,
Knuckles
Locked

Return to “Layout and Design (CSS & HTML)”