I have installed a contribution which makes the infobox headings in to links rather than the arrows to the right of the heading. It has created the link OK, but it refuses to get the color and hover color from the stylesheet.scc
The line of code is:
$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" class="a.textbox">' . BOX_HEADING_SHOPPING_CART . '</a><br>' );
and the addition to the stylesheet.css is:
a.textbox {
color: #ffffff;
}
a.textbox:hover {
color: #ffffff;
}
I don't know enough about PHP to see why this is wrong, any hints?
Cheers
Kev
Latest News: (loading..)
Why won't this line of code get it's class color?
Started by bigbob2, Dec 28 2011, 18:59
4 replies to this topic
#1
Posted 28 December 2011, 18:59
#2
Posted 28 December 2011, 20:05
Well I don't think you can use periods in the name of a class.
Try this:
then change your class="a.textbox" to class="textbox"
Try this:
.textbox{color: #ffffff;}
.textbox A:link {text-decoration: none;}
.textbox A:visited {text-decoration: none;}
.textbox A:active {text-decoration: none;}
.textbox A:hover {text-decoration: underline; color:#ffffff;}
then change your class="a.textbox" to class="textbox"
#3
Posted 28 December 2011, 21:21
Awesome! That did the trick thank you
)
Cheers
Kev
Cheers
Kev
#4
Posted 28 December 2011, 21:54
You're welcome Kevin
Glad to help
Glad to help
#5
Posted 28 December 2011, 23:59
a.textbox is a valid selector entry in the CSS file to declare that class "textbox" when used with an anchor (<a>) tag has the specified properties. You would never use "a.textbox" in the tag's class name as you were doing here. It would just be class="textbox". In the CSS file, a.textbox could be used, or just .textbox if you had no other uses of that class.














