Forums / Templates, Stylesheets, Page Layout / Rollover images, CSS and main_page

Rollover images, CSS and main_page

Locked

Views: 756

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
14 Jul 2010, 1:07 PM
#1
rebel_tech avatar

rebel_tech

New Zenner

Join Date:
Dec 2009
Posts:
41
Plugin Contributions:
0

Rollover images, CSS and main_page

Hi

I am having a slight problem.

I have created my rollover images in Illustrator but I seem to have a problem with the php to get it to see the css.

I have added the following to "stylesheet.css" in my template folder.

a.homebutt {
display: block;
width:120px;
height:40px;
text-indent:-5000px;
background: url (.../images/homebutton.jpg)
text-decoration:none;
}

a.hover.homebutton {
background-position: -120px 0;
}

In the tpl_main_page where I want to display the home button I have

<td><a href="index.php">class="homebutton" width="120" height="40" border="0" alt="" /></a></td>

The link is displayed but the image does not :(

Any ideas? :cry:

15 Jul 2010, 8:52 AM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Rollover images, CSS and main_page

any link ?
what browser did you try this ? IE has some issue with text-indent , but there are work around for it .

15 Jul 2010, 3:56 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Rollover images, CSS and main_page

a..homebutt { does not match the classname in your code. Did you just mistype it here?

a.hover.homebutton { is incorrect CSS syntax and will not do anything. It needs to be
a.homebutton:hover { if you want a rollover effect.