Support » Fixing WordPress » Cannot get theme to obey class=”alignleft” as theme’s default is class=”left”

  • I haven’t upgraded to the latest WordPress version so this is a problem with the previous version. I’ve read through the threads and tried everything suggested, including adding this codex instruction to the style sheet:

    img.centered, .aligncenter, div.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    }

    img.alignright {
    padding: 4px;
    margin: 0 0 2px 7px;
    display: inline;
    }

    img.alignleft {
    padding: 4px;
    margin: 0 7px 2px 0;
    display: inline;
    }

    .alignright {
    float: right;
    }

    .alignleft {
    float: left; }

    Nothing works so far, and I don’t want to manually change all the code in the many images I have on my site http://www.joyfuldays.com

    Can someone please tell me how to get the theme to understand class=”alignleft”?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Show a posts where “nothing works”.

    Where did you add that to your stylesheet? At the top or bottom? If it’s at the top, something set later on could be messing with it. You should add it to the end.

    You didn’t say what theme you were using, so it could be that the theme is using many included stylesheets (some of them do that) and one of *those* could be overriding your changes. You either need to look through your stylesheets and find where it’s already set, or make absolutely sure that what you want is after every other stylesheet is called in.

    Wow, thanks for the quick response. I’ve just activated the theme that doesn’t work. Look at the images in the sidebar, or follow the excerpts to the full posts. Funny thing is the alignment works fine in the excerpts, and I think that’s because the code uses ‘thumbnails’ in the excerpt coding.

    doodle bee, i added to the end as well as in various sections like img, full-posts etc.

    Off topic but the categories and archives widgets push the post numbers to the next line. any ideas there would be appreciated!

    I see the images floated left – you just need to add a margin to the right side of the image. Is that what you mean? You just add that in the stylesheet. (your “.alignright” and “.alignleft” don’t have any margin settings.)

    i need the { display: inline } code somewhere in there to get the images to wrap round the image right? yes the margins are wonky too, i haven’t got around to working on that. i can only handle one html problem at a time!

    no, images display inline by default. If they aren’t, then you have “display:block;” set somewhere for your images. But from what I see, all you need to do is set a maring. Everything else looks fine.

    And what do you mean “to get the images to wrap around the images”?

    Ah, now I understand. You are using IE? Yes just changed browswer and realised that the text is flush in IE, so you’re right I just need the margins. In FF though the text is not flush.

    Please don’t tell me this is getting complicated. How do I get FF to show what IE does?

    You are using IE?

    only when forced to through severe torture (or someone pays me to). I’m running FF3 on Mac OSX.

    You must have edited it, because the margins are there now.

    doodlebee, thanks so much for all your replies. yes i edited for the margins, thanks for pointing that out. but i went back to my old theme as there are just too many bugs in this new one. darn, defeated by another wordpress theme!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cannot get theme to obey class=”alignleft” as theme’s default is class=”left”’ is closed to new replies.