WordPress.org

Forums

Twenty Fourteen
[resolved] Alignment of images doesn't work properly (5 posts)

  1. Sheriziya
    Member
    Posted 1 year ago #

    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?

  2. stephencottontail
    Member
    Posted 1 year ago #

    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;
    }
  3. Sheriziya
    Member
    Posted 1 year ago #

    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!

  4. stephencottontail
    Member
    Posted 1 year ago #

    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.

  5. Sheriziya
    Member
    Posted 1 year ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.