Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Category list box contents - change link bg colour

    Hello I want to change the background colour of the link text in the category list box contents.To look like the image below:
    Name:  food.jpg
Views: 237
Size:  9.2 KB

    I have tried to style the links in css but it affects all ez pages links.
    Example of what I did:
    .categoryListBoxContents a:link, {background-color:#ffffff;
    }

    So then, do I alter modules/category_row.php file?
    if so would it be this( line 38) that I edit and if so how do I write it in?

    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"'

    Any help appreciated.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Category list box contents - change link bg colour

    When asking styling questions, a link to the page is much more useful than a screenshot.

  3. #3
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Category list box contents - change link bg colour

    I am working on a local machine using xampp didn't know I could post a link to it.
    Here is the link I use in my browser http://www.example.com/thai_restaurant/

  4. #4
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Category list box contents - change link bg colour

    Even if someone could tell me how to add a class to the links for the category list box contents. I think that would work.

  5. #5
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Category list box contents - change link bg colour

    Ok figured it out. For anyone else trying this, it was possible to style this using css.
    Looks like my above syntax was wrong. What does work for me is:
    .categoryListBoxContents a:link{background-color:#FFFFFF;
    }


    Not too different from the earlier mentioned code just removed the comma.
    Hope this helps someone

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Category list box contents - change link bg colour

    Sorry, we can't see a link on your local machine. That will make it trickier for us to advise. You say
    Example of what I did:
    .categoryListBoxContents a:link, {background-color:#ffffff;
    }
    Is that exactly what you did? There is a comma after the one selector that will invalidate the rule. Make it
    Code:
    .categoryListBoxContents a:link {background-color:#ffffff;
    }
    and see what happens. This rule can only affect links inside the categoryListBoxContents element.


    Glad you got it fixed:)

  7. #7
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Category list box contents - change link bg colour

    Ah ok, Thanks for the input. Am ever grateful as ever gih42

 

 

Similar Threads

  1. Change Link Colour
    By russ_94 in forum Basic Configuration
    Replies: 10
    Last Post: 4 Apr 2010, 08:21 PM
  2. Change font colour of Manufacture List
    By hargz in forum General Questions
    Replies: 1
    Last Post: 9 Feb 2009, 05:27 PM
  3. Change colour link at bottom
    By Opal in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Sep 2008, 11:22 PM
  4. change list marker in category box
    By salsy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Jun 2008, 08:25 AM
  5. Change the link colour of selected category...
    By Alex Clarke in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 12 Jul 2007, 08:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg