Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Targeting a single element with CSS

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #182304
    rory
    Participant

    Hi,
    I am trying to edit text color on a website and can usually do this easily. The problem I am having is that I cannot stop the changes affecting other text on the page. I think this issue is caused by bootstrap……..so i am looking for help to target only the text I want to change.
    really appreciate if someone can help me with this.
    cheers
    rory

    #182306
    chrisburton
    Participant

    Link? Reduced test case? Anything?

    #182307
    rory
    Participant

    hi chris
    thanks a lot for your reply.
    can I send you the info by email?
    cheers
    rory

    #182308
    chrisburton
    Participant

    @rory Hi. Why not here? Your question may help others.

    #182310
    rory
    Participant

    ok ….well I am trying to integrate whmcs into a site that will sell domains,hosting and web services. The site is not completed but is live. In the editing of the whmcs order pages i have been caught out by changing text colors to match the main site.
    If you look at the pages
    https://www.kantoninternational.com/billing/supporttickets.php
    or
    https://www.kantoninternational.com/billing/submitticket.php
    You cannot read a lot of text until you mouse over it but when I change it with firebug it also changes the main menu text. So I need the trick to write a little css to target just the text that needs to be changed.

    #182311
    chrisburton
    Participant

    You’re targeting all anchor elements (<a>). You can simply add the parent element before the anchor in CSS.

    So instead of

    a {color: blue;}
    

    which targets every link:

    You can do

    .rememberme a {color: blue;}
    

    This only targets the links within a class of ‘rememberme’ (<div class="rememberme">)

    #182312
    rory
    Participant

    thanks chris.
    I do not have a lot of experience with this so appreciate your assistance. Do I have to add that class
    (

    <

    div>) and where should it be added.
    rory

    #182329
    chrisburton
    Participant

    @rory You need to edit your whmcs.css file.

    Remove the following:

    a {
        color: #ffffff;
    }
    
    #182362
    nigelc
    Participant

    You could target the nav links by using:

    .navbar ul li a{color:white;}

    and then set the color value for the other links to blue or whatever:

    a{color:blue;}

    #182463
    rory
    Participant

    hey nigel
    thanks……that worked really well but leads to another problem because it caused all the drop down menus to be white and they are on a white background.
    What would I need to write to make the drop down menu to be a different color or I could write something to make the drop down container blue background
    Thanks a lot for your help

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Design’ is closed to new topics and replies.