WordPress.org

Support

Support » How-To and Troubleshooting » Aligning of images doesn’t work

Aligning of images doesn’t work

  • 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 ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Michael

    @alchymyth

    Forum Moderator

    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.

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

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Aligning of images doesn’t work’ is closed to new replies.