samb0005
Member
Posted 1 year ago #
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!!
Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance.
samb0005
Member
Posted 1 year ago #
I can't see any obvious problems with that page.
samb0005
Member
Posted 1 year ago #
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.
samb0005
Member
Posted 1 year ago #
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
samb0005
Member
Posted 1 year ago #
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 ;-)
samb0005
Member
Posted 1 year ago #
All sorted! Thanks so much for all the help :)