• Resolved neweb

    (@neweb)


    I built a custom theme from scratch (working of the TwentyTen Theme)

    This theme is working well with the exception of the images places on pages or posts.

    When I add an image via the media button I get the option to set it left right and so on. If I set it right then view the page it is not aligning correctly.
    Here is an example:
    https://newebirl.ie/mnsite/test-page/
    The image on this page is set to align right.

    I’m not sure what the code is for this in the CSS file and I think it could be missing from mine.

    Can anyone tell me how to get the images to align as they should or do in the TwentyTen theme??

    Or even tell me what the code is that I should have in my CSS file.

    Thanks in advance.
    Alan

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try using Firefox with the Firebug add-on for this kind of CSS work.
    https://getfirebug.com/

    Thread Starter neweb

    (@neweb)

    I did but its not showing the code.

    Its only showing
    class="size-full wp-image-30 alignright"

    There is no such class in the style sheet.

    Then you need to add the appropriate classes to your theme’s stylesheet.

    .alignleft {
    	display: inline;
    	float: left;
    	margin-right: 1.625em;
    }
    .alignright {
    	display: inline;
    	float: right;
    	margin-left: 1.625em;
    }
    .aligncenter {
    	clear: both;
    	display: block;
    	margin-left: auto;
    	margin-right: auto;
    }
    Thread Starter neweb

    (@neweb)

    Thank you very much for that.
    I put the code above into the site and the images all popped into their correct position.

    Your help is very much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image Alignment’ is closed to new replies.