Forum Moderators: not2easy

Message Too Old, No Replies

Two images on the same line

Left and Right justified

         

giggle

9:05 am on Nov 3, 2005 (gmt 0)

10+ Year Member



Hi

I'm trying to put two images on the same line, one left justified and the other right justified...having an horrendous time achieving this. One is left justified and the other right but they're on two different lines.

Can this be done?

Thanks

Mick

Hester

9:22 am on Nov 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Float 'em.

CSS:


.left {float:left;}
.right {float:right;}
.clear {clear:both;}

HTML:


<img class="left" etc... />
<img class="right" etc... />
<p class="clear">Anything after the images will need to be cleared like this.</p>

giggle

9:30 am on Nov 3, 2005 (gmt 0)

10+ Year Member



Thanks Hester.

Worked first time. Saved me some hair.

All the best

Mick

giggle

9:34 am on Nov 3, 2005 (gmt 0)

10+ Year Member



Thanks Hester.

Worked first time. Saved me some hair.

All the best

Mick

giggle

9:41 am on Nov 3, 2005 (gmt 0)

10+ Year Member



Sorry, Hester

If I could bother you one more time in a related question.

The right-justified image is a clickable link to another page. It has that ugly border around it.

I tried border-style: hidden; but that didn't work.

Is there a way to get rid of the border?

Thanks

Mick

Robin_reala

9:42 am on Nov 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



a img { border: 0; }

giggle

9:47 am on Nov 3, 2005 (gmt 0)

10+ Year Member



Bingo!

Thanks Robin.