• Resolved benjaminzand

    (@benjaminzand)


    Hi there,

    I was editing my site’s CSS today (trying to put a little flash map in position) and all of a sudden my sidebar has shifted to the left. Everything else is in the exact same position and can be moved via CSS, but despite what I do to the sidebar’s CSS it stays in the exact same position. If I edit the CSS using firebug on Firefox I can successfully move the side bar into the right position, but when I try and save this in the style.css I see no changes at all.

    Here is my site and here is the code I’m using:

    /* Sidebar */
    #sidebar {float: right; display: inline; width: 320px; }
    #sidebar .widget {margin-bottom: 10px; font-size: 12px; line-height: 18px; }
    #sidebar .widget li {font-size: 14px; line-height: 24px; }
    #sidebar div.cover {margin-right: 10px; }
    #sidebar ul.posts h3 {overflow: hidden; font-size: 12px; line-height: 18px;}
    #sidebar ul.posts p.postmetadata {font-size: 11px; }

    Any help would be amazing.

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter benjaminzand

    (@benjaminzand)

    Okay, it’s telling me I have 15 errors. So I’ve definitely done something wrong. Nearly everyone is a ‘Parse Error’. Do you know what this is?

    When you have a child theme set up — it IS your site — so it’s just your regular URL — and you do have some errors – look at the second section of the validator report — for the child theme stylesheet:

    https://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Finformedexplorer.com%2F&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en

    Some “errors” are not a problem and are actually just because not all CSS is recognized as valid — even though it does not cause problems. But parse errors (usually syntax) are problematic.

    For example, look at this error:

    #map 	Parse Error #navigation {line-height: 34px; }

    Then go find that line on the stylesheet and you’ll see that you are missing a closing bracket for the #map CSS.

    Missing brackets invalidate any CSS that follows…so those are major. You may also be missing things like semi-colons.

    The other thing that I would suggest is that you use the standard WP (and preferred convention) format for CSS code – it’s MUCH easier to read and track down errors —

    i.e.:

    selector {
    style;
    style;
    style;
    }

    Thread Starter benjaminzand

    (@benjaminzand)

    Okay, I’ll do my best to rectify the errors. Do you think this will resolve the problem of not overriding the parent stylesheet? Also, I think I’m definitely going to need to read up on CSS a bit more because I’m a bit confused.

    In terms of the standard WP, how would I write something like this in the standard way?

    #container {width:100%; text-align:center; min-height: 200px; }
    #container div.wrapper {margin: 0 auto; text-align: left; width: 960px; }
    #container div.cleaner {clear: both; font-size:1px; height: 1px; margin:0; line-height: 1px; }
    #container div.sep {font-size:1px; height: 1px; margin:0; line-height: 1px; margin: 3px 0; background-color: #ccc; }

    Thanks so much for helping me out.

    Thread Starter benjaminzand

    (@benjaminzand)

    Okay, I’ve rectified the errors apart from these two which I don’t understand.

    #menuSocial img {-moz-opacity:30; filter:alpha(opacity=30); opacity:30;}
    #menuSocial img:hover {-moz-opacity:1; filter:alpha(opacity=100); opacity:1;}

    It says there are issue with alpha(opacity=30) and alpha(opacity=100) which I can’t fix no matter what I’ve changed.

    Despite sorting out these issues though, the child theme is now completely disregarding its CSS and only using the parent theme’s CSS. Do you have any idea of why that may be?

    Yeah, don’t worry about those errors — those are browser specific and not a problem.

    But, you have bigger problems with other (non CSS) errors – looks like something weird is happening in the header.php file — a bunch of stuff is in the body which should not be…

    https://validator.w3.org/check?uri=http%3A%2F%2Finformedexplorer.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    Thread Starter benjaminzand

    (@benjaminzand)

    Wow, I have never even touched that file that’s came with the theme.

    I’ve actually fixed the CSS problem now, basically I just recreated my child theme as when I previously created it I copied over the entire parent style.css into the child theme so I think that may have caused a few problems.

    The theme editor’s working completely fine now, do you think these header.php issues are gunna cause future problems?

    Thanks for your help btw I really appreciate you taking the time out!

    [ Please do not bump especially with a blank posyt. That’s not permitted here. ]

    I really don’t know, but I’d suggest you contact the theme vendor (wpzoom?) about those issues. It looks like that’s a commercial theme, in which case, they should be supporting it.

    Thread Starter benjaminzand

    (@benjaminzand)

    Okay I will do, thanks a lot the help.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Sidebar won't move despite changing CSS’ is closed to new replies.