• Hi,
    I’ve managed to change the colours in my text areas like search form, comments, login etc – to a dark grey.

    But they’re only this colour until the user clicks on them then they revert to the default white. Teh problem is, i’m using white text everywhere which makes them unreadable.

    I’ve searched the forums and found countless solutions but these only every change the colours before they’re clicked on.

    It’s got to be 1 simple bit of code but i’m really struggling and spent all day on this now, any help would be greatly appreciated.

    thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • You need to use the :focus CSS pseudo selector in your child theme or custom CSS plugin.

    Thread Starter fpats

    (@fpats)

    Thanks esmi, i’ve entered it into the custom CSS with the right colour code but it’s not worked.

    I’ll keep trying ??

    Thread Starter fpats

    (@fpats)

    i’ve managed to change the text to black in the comments form which works, using this code..

    #commentform input:focus, #commentform textarea:focus {color:black;}

    Could anyone point me to where i’d do this for all forms?
    i need “search box” “login” & “registration”

    thanks again

    It really depends upon the theme that you are using but try something like:

    input[type="text"]:focus,
    input[type="password"]:focus,
    textarea:focus {
    color:#000;
    }
    Thread Starter fpats

    (@fpats)

    Got it working, thanks again!!

    Final related issue is the drop down selection menus in Buddypress, i don’t know if you can help or if i need to start a new topic…

    The dropdown to choose where posts are being made is also white on white. If i change the text colour it changes other text on the page which i need to remain white due to the dark background so i’m completely stuck.

    Try using Firefox with the Firebug add-on to locate the CSS that you need to over-write via your custom CSS plugin. Or use whatever developer tool is available in your web browser.

    Bush

    (@manishkumarruhil)

    Giving reference to website or theme will make it easier to tell where exactly you need to make changes.

    OR
    if you don’t want to tell than you can find out yourself. It will be little tricky but may be you can figure it assuming that you have some knowledge of CSS.

    Go to your website -> click search and bring it to the position at which you are facing difficulties.

    Right click on search and click “inspect Element” if in chrome (or there would be something similar for other browsers)

    below some coding will appear (HTMLs and CSSs). On right hand side column are the CSSs styles which are affecting it (search button). See coding similar to your issue. Eg:- if its displaying white than find white color and coding in front of it will the which you have to edit. Find it in stylesheet or wherever it exist and edit that.

    Reply if still having trouble.

    Thread Starter fpats

    (@fpats)

    thanks, that’s what i’m doing but if i change the text colour in the drop down it also changes some of the text elsewhere. Maybe it can’t be done.

    the theme is BUDDY
    If you click on “buddypress” then “activity” it’s the box that has “show” at the side of it.

    Bush

    (@manishkumarruhil)

    Ok, I am having difficulty in understanding what you are saying.

    If I am not wrong than your are saying that you are using white text and its background also changes to white (the box that has “show” at the side of it).

    You can try finding (using search box in style.css by pressing ctrl + f):-
    select {
    -webkit-appearance: menulist;
    box-sizing: border-box;
    -webkit-align-items: center;
    border: 1px solid;
    border-image-source: initial;
    border-image-slice: initial;
    border-image-width: initial;
    border-image-outset: initial;
    border-image-repeat: initial;
    white-space: pre;
    -webkit-rtl-ordering: logical;
    color: black;
    background-color: white;
    cursor: default;
    }
    and edit it to get your desired results.

    You are saying that making change at one place is changing things at other places to. This could be because that coding of different stuffs (like comment and search button) are combined together. One such case I found is:
    input, textarea, keygen, SELECT, button, isindex {
    margin: 0em;
    font: -webkit-small-control;
    color: initial;
    letter-spacing: normal;
    word-spacing: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    text-align: start;
    }

    here coding of textarea and that box is combined. You can easily separate them and make changes to theme differently. Like:
    input, textarea, keygen, button, isindex {
    margin: 0em;
    font: -webkit-small-control;
    color: initial;
    letter-spacing: normal;
    word-spacing: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    text-align: start;
    }
    AND
    select {
    margin: 0em;
    font: -webkit-small-control;
    color: initial;
    letter-spacing: normal;
    word-spacing: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    text-align: start;
    }

    One such example when you need to do this is suppose when you have your website’s title and subtitle both in left and you want to just make title move centre but both coding are combine like this:
    .site-header h1, .site-header h2 {
    text-align: left;
    }

    you can break this to:
    .site-header h1 {
    text-align: center;
    }
    .site-header h2 {
    text-align: left;
    }

    Hope it might help you. If I am understanding it wrongs than please clarify me.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Need help to change textarea colours after clicking.’ is closed to new replies.