WordPress.org

Ready to get started?Download WordPress

Forums

Aligning of images doesn't work (3 posts)

  1. jeyaganesh89
    Member
    Posted 4 years ago #

    I have installed a theme on my site.

    when ever i try to align images like right or left. It doesnt show on my post. By default all image is left aligned. Even i align right , it just shows on left side .. wat to do ??

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    check style.css of your theme and see if there are styles for .alignleft, .aligncenter, and .alignright -

    if not, then add these styles (from the default theme) into the style.css of your theme:

    img.alignright {
    	padding: 4px;
    	margin: 0 0 2px 7px;
    	display: inline;
    	}
    img.alignleft {
    	padding: 4px;
    	margin: 0 7px 2px 0;
    	display: inline;
    	}
    img.aligncenter {
    	display: block;
    	margin-left: auto;
    	margin-right: auto;
    }
    
    .alignright {
    	float: right;
    	}
    .alignleft {
    	float: left;
    	}
    .aligncenter {
    	display: block;
    	margin-left: auto;
    	margin-right: auto;
    }

    if that does not work, please post a link to your site where the problem can be seen.

  3. jeyaganesh89
    Member
    Posted 4 years ago #

    gr8 , Thank you alchymyth .. it worked.. I have added those css into my style.css.. now my images are aligning well..

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags