WordPress.org

Support

Support » Themes and Templates » Twenty Fourteen » [Resolved] Alignment of images doesn't work properly

[Resolved] Alignment of images doesn't work properly

  • Hi,

    I’d like to use the 2014 theme because of all the nice elements, like the slider, great featured images and more.

    However… I ran into a problem. Well, actually several, but I think at least one of them is already being worked on.
    Anyway, here’s my problem. When I align my images right or left, they’re going out of the boundaries of the posts, like you can see here.

    This, of course, is not supposed to happen. The image linked above I made with all plugins deactivated, so it’s only the theme and a basic WP install.

    With Fourteen Extended installed, the images go under the left sidebar and out of the right boundary…..

    Is there a solution for this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator stephencottontail

    @stephencottontail

    I vaguely recall reading somewhere that this is the intended design for the theme. I personally don’t like it either, though. If Fourteen Extended provides a custom CSS option, use it; otherwise, get a custom CSS plugin and put this:

    .full-width .site-content img.size-medium.alignright {
    	margin-right: 0;
    }
    
    .full-width .site-content img.size-medium.alignleft {
    	margin-left: 0;
    }

    If in the future, you use an image with captions, you’ll use this CSS as well:

    .full-width .site-content .wp-caption.alignright {
    margin-right: 0;
    }
    
    .full-width .site-content .wp-caption.alignleft {
    margin-left: 0;
    }

    Ah, thanks for the help! I checked the theme demo but there the images were normally in line with the post on the “Image alignment & styles” page.
    Hence my confusion 🙂

    I’ll use both adjustments to the CSS.

    BTW, does that plugin do something different then the “Edit CSS” under Appearance? Cause I have that option under appearance? Just wondering 🙂

    The adjustment to the CSS worked like a charm! Thanks!

    Moderator stephencottontail

    @stephencottontail

    I’m not completely familiar with the demo site, but one difference is that left- and right-aligned images only go into the margins if you’re using the full-width (i.e., no sidebar) template.

    You should use the plugin because using the “Edit CSS” option under “Appearance” edits the theme files directly. If the theme were to ever be updated in the future, any changes you made to the theme files would be overwritten. However, using a custom CSS plugin means that your changes will stay even if the theme gets updated.

    Ah! Thanks for that explanation.

    Well, for post I use the default settings. However I wanted no right sidebar, only the left sidebar. But the alignment is explained, anyway, with this 🙂

    I’ve installed Simple Custom CSS and it works like a charm! Thanks for the tip 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Alignment of images doesn't work properly’ is closed to new replies.
Skip to toolbar