WordPress.org

Ready to get started?Download WordPress

Forums

[closed] changes to style.css do not always show! (14 posts)

  1. suavedesign
    Member
    Posted 1 year ago #

    Theme I am using is business-lite.
    When I try to make changes to the css styles, (style.css), some of the changes show up, but some do not!
    I made a child theme, and copied style.css to my new child theme directory. Now, when I make changes, such as border, background-color, etc, the changes to some elements show, while others do not. The only thing that does seem to always show is display:none;
    What can I do to figure out this issue??

    My url is http://www.accupresh.com

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    It sounds as though you're not using specific-enough selectors to override your parent styles.
    http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/

  3. suavedesign
    Member
    Posted 1 year ago #

    I dont think that's the problem, since in some cases, all I am doing is CHANGING a style- for example- from red in the parent style, to blue in the child theme. I dont think that would be a problem of specificity.
    There are a whole bunch of css files in this theme, though. Could it be that not all elements are editable in style.css? Maybe I have to go into other css files to make the changes??

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    What specifically doesn't change the way you want, on your website?

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Looking at your site, some of the other stylesheets are being loaded after your child theme file -- so that also makes a difference -- but specificity in selectors should still be able to override that code. Or if all else fails, try using !important.

  6. suavedesign
    Member
    Posted 1 year ago #

    Thanks for your help.

    Andrew- For example, I put in my style.css
    #container{
    background-color:green;
    }
    And nothing changes.

    WPyogi- Which stylesheets are being loaded after my child theme file? That would make a big difference!

    Thanks for trying to help me!

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Use View Source and look at the list of linked stylesheets in the head section of the page.

    "container" is a class not an id - use a period not a hashtag.

  8. suavedesign
    Member
    Posted 1 year ago #

    Thank you for your help.
    I looked at style.css for the parent theme, and it has #container, with the styles for container there. That's why, on my child theme, I also wrote #container, and tried to make changes to it.
    I'm so confused- how should I know where to find the styles I want to edit, if not in the style.css of the parent??!

    Thanks again for your help...

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Try using Firebug to look at the actual page -- IMHO, it's impossible to work with CSS without a tool like that.

    Yes, I see that #container is used in the regular style.css file -- but if you search the rendered HTML -- there is no id="container" which is rather odd.

    There IS definitely this HTML: <div class="container"> .

    Frankly, for me, that kind of thing would raise a few questions about the theme -- though since I have not looked at it in detail, there may be something else going on.

  10. suavedesign
    Member
    Posted 1 year ago #

    thanks for your help.

  11. suavedesign
    Member
    Posted 1 year ago #

    Another thing- how do I get the files on my child theme to show up in appearance-editor, in my dashboard? I copied a file from the parent theme to my child theme, and put it into my child theme folder, via ftp. But I dont see those files when I check in appearance-editor.

  12. ronangelo
    Member
    Posted 1 year ago #

    Your site shows this:

    .container {
       color: green;
    }

    change it to this:
    (I assume you want the background to change, not the text color)

    .container {
       background: green;
    }

    You can always add an !important to force the property.

    background: green !important;
  13. suavedesign
    Member
    Posted 1 year ago #

    Thanks.

  14. esmi
    Forum Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.