• Resolved bassplayer84

    (@bassplayer84)


    Hello, some few CSS questions from a noob, need to know which code to add to custom css for:

    1) how to edit footer background color.
    2) change widget title text color and widget background color
    3) change main content text color

    Thnx

Viewing 15 replies - 1 through 15 (of 16 total)
  • Can you post a link to your site?

    Thread Starter bassplayer84

    (@bassplayer84)

    Points 1-3 are ok.

    Just need to know, if possibile, how to edit widget areas background colors.

    I did some changes via Custom CSS, but didn’t work. I edited style.css manually and changes took effect. Why?

    https://www.ipasvirimini.it

    my website

    You’ve got a syntax error in your custom CSS. On line 14 you have:

    widget-title {
    	color: #004552;}

    but it should be

    .widget-title {
    	color: #004552;}

    Note the period before widget-title.

    To clarify, when you refer to the widget area background color, you’re referring to the area labeled “In Evidenza”, correct? If so, use this code in your custom CSS plugin:

    #secondary { background: #00ff00; }

    Thread Starter bassplayer84

    (@bassplayer84)

    OK thnaks a lot!!!

    And to have widget area text in white?

    Thnx

    Thread Starter bassplayer84

    (@bassplayer84)

    Sorry, i meant link (not visited) color.

    For text color i added : color: #FFFFFF;

    You’ve got another syntax error in your custom CSS. On line 16, you’ve got:

    /*
    #secondary { background: #527c84;
    color: #FFFFFF;}

    but that /* at the beginning means it’s a comment, which the browser ignores. So it should look like this:

    #secondary { background: #527c84;
    color: #FFFFFF;}

    To change the color of the links in the sidebar, use this code:

    #secondary a { color: #00ff00; }
    #secondary li a { color: #00ff00; }
    Thread Starter bassplayer84

    (@bassplayer84)

    yeah i commented those lines because i need to wait for my client to decide the colors.

    THnx a lor for advices.

    Thread Starter bassplayer84

    (@bassplayer84)

    One last question:

    i’ve translated the template with Poedit.

    But the search widget still displays “search” label inside, instead the italian translated word “cerca”.

    Any suggestions?

    Looks like a problem with the theme. The string that acts as the placeholder (“Search …”) isn’t actually in the theme’s POT file. It would be best if the theme author fixed this in a future update, but for now, you could fix it yourself in a child theme.

    You’d have to copy the POT file from the parent theme to themes/bota-child/languages and then edit the catalog to load the appropriate strings. In PoEdit, under Catalog > Properties > Sources paths, you’d have to change “Base path” from . to ../../bota/languages, and then under Sources keywords, you’d have to add esc_attr_e to “Additional keywords”. Once that’s done, you should see the new string in the catalog, ready for translation. You’d then have to load the catalog into your child theme using load_theme_textdomain():

    function load_translations() {
        load_theme_textdomain( 'bota', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'load_translations' );
    Thread Starter bassplayer84

    (@bassplayer84)

    Thnx for the great help man!

    Thread Starter bassplayer84

    (@bassplayer84)

    I have one more problem:

    if i change the link color, even links in the side bar will change.
    How to control them separate?

    thnx

    Thread Starter bassplayer84

    (@bassplayer84)

    I’ve added to custom css:

    #secondary a { color: #FFFFFF; }
    #secondary li a { color: #FFFFFF; }
    #secondary a:visited { color: #FFFFFF;}

    but it still takes the styles from #main

    what’s wrong?

    stephencottontail

    (@stephencottontail)

    From what I can see, you don’t have any links in your sidebar that would use those CSS rules. The links in the section labeled “Risorse” (“Bandi e Concorsi”, “Formazione”, etc.) are controlled by the rule #dc_jqaccordion_widget-2-item ul a:hover { ... }. Are those the links you’re trying to change?

    Thread Starter bassplayer84

    (@bassplayer84)

    I had a scrolling news widget, the title of the news had a link, and it was red like main content link color.

    I disabled it for the moment due to that color.
    If you go in the Contatti widget and click in the mail one, the mailto on the mail address itself it’s stil red!

    Help!

    stephencottontail

    (@stephencottontail)

    What’s happening is that

    #secondary a { color: #FFFFFF; }
    #secondary li a { color: #FFFFFF; }
    #secondary a:visited { color: #FFFFFF;}

    and

    #main a { color: #c82412; }
    #main li a { color: #c82412; }
    #main a:visited { color: #c82412;}

    have the same specificity and since the rules beginning with #main are defined last, the browser uses those rules. Your best bet is to move the rules beginning with #secondary after the rules beginning with #main. That way, the links in the main content area will remain red, but the mailto link in the sidebar will be white (or whatever color your client chooses).

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Some CSS help’ is closed to new replies.