Recent Topics

1 Mar 31, 2009 23:28    

My b2evolution Version: 2.x

I'd like to insert 1, 2 or 3 images next to each other, and have them centered. No floating, no text warp, nothing, just images in the center of the page.
Someone ill advised the use of "align: center" and indeed it would be more elegant to have it in CSS like the "leftmargin" and "rightmargin" classes.
I tried all kinds of stuff in the skin's CSS but no center. I'm not a CSS cowboy, so I ran out of ideas... :)

2 Apr 01, 2009 01:09

Try using the regular "insert img/link into post" button when ...

From the beginning: Write a new post, click on Files, select three images, click on "insert img/link into post" or (something like that) THEN look at the code it gives you. Basically you'll have a div image_block for each image. If you provided caption text with your images then you'll have a div caption_block (or something like that) before the image_block div is closed. So try smooshing all the image tags into ONE div image_block.

I think it'll work. Not totally sure, but hey if you try it you'll know!

3 Apr 01, 2009 04:59

put all 3 img's in the same div and center it

html:

<div class="imgdiv"><--! start inserting the images--><img src="myimage1.jpg /><img src="myimage2.jpg /><img src="myimage3.jpg /></div>

css:

.imgdiv {
margin: 0 auto;\

/* use float if the images doesnt stay side by side like
img {float: leftt;}*/

4 Apr 01, 2009 17:33

.imgdiv {
	text-align:center;
	border: medium dotted #FF0000;
}

¥

*edit*

Ooops, sorry zoltan, I edited your post instead of replying ..... I'm blonde so make allowances :p

The good news is, it now looks like you solved your own problem :D

¥

5 Apr 01, 2009 18:54

I'm happy to report that the solution in the previous post works well. :)

Thank you guys!


Form is loading...