Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Why won't this line of code get it's class color?


Recommended Posts

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?




Link to comment
Share on other sites

Well I don't think you can use periods in the name of a class.


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"

Link to comment
Share on other sites

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.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...