WordPress.org

Support

Support » Themes and Templates » [Resolved] [boldy theme] How to display centered images inline?

[Resolved] [boldy theme] How to display centered images inline?

  • Hi

    Wonder if anyone can help me cos despite playing around with the code and searching the forum I just can’t find an answer to what I think it probably a very simple problem.

    I want to have a row of 3 thumbnails on a page and have them centred and in a single line.

    When I use the code `#content #colLeft img.aligncenter {
    margin-left: auto;
    display: block;
    margin-right: auto;}`
    everything is centred however the images are on different lines (so one image below another). If I change the display to inline, then the images are all on the same line but become left aligned. I’ve tried putting in text-align: center but unfortunately that has made no difference.

    Any help would be appreciated!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • esmi

    @esmi

    Forum Moderator

    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance.

    esmi

    @esmi

    Forum Moderator

    I can’t see any obvious problems with that page.

    The three images are below each other (see link to screenprint) rather than on the same line. Any suggestions would be appreciated!
    www

    set the images to ‘alignnone’;
    set the paragraph to text-align:center;
    and edit style.css:

    #content #colLeft img {
    
    	margin: 0;
    
    	height: auto;
    
    	max-width: 640px;
    
    	width: auto;
    	display:block;
    
    }

    remove the display:block; which is stopping the images to be on one line.

    Thanks for your reply. I have followed your advice but while this has made the images appear on the same line, they are not centred.

    When you said ‘set the paragraph to text-align:center;’ does that mean in the visual editor, clicking on each picture and hitting the ‘centre’ text button?

    The code for .alignnone is as follows – does this need to be changed at all do you know?

    #content #colLeft .alignnone{margin:10px;}

    Thanks

    Ok, if I centre the last sentence of the text before the images as well as the images, then it makes the images go in the centre, which if all else fails will be great.

    Not to be super fussy … but is there a way where I can keep my images in the centre, but still have left aligned text?

    Thanks for all the help, I really appreciate it.

    does that mean in the visual editor, clicking on each picture and hitting the ‘centre’ text button?

    i would try to highlight all three images, and click the ‘text center’ button – untested, no guarantee.

    i just had a look at your site, and it seems that you are to close to success 😉

    All sorted! Thanks so much for all the help 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] [boldy theme] How to display centered images inline?’ is closed to new replies.
Skip to toolbar