Log in

View Full Version : Columns in html/css



Colin-Roberts
22-07-2009, 05:49 PM
I want to make it so i can write beside an image on the right side, i would like to avoid using a table tho, i already use float left/ float right in divs, so i can do it again within a div can i?

Excellent2
22-07-2009, 05:56 PM
<img src="img.png" align="left"> Text here


That will do it.

Black_Apalachi
23-07-2009, 04:23 AM
<img src="img.png" align="left"> Text here


That will do it.

And when you find the text is right up against the image, add <img src="img.png" align="left" hspace="5"> changing the 5 to whatever amount of pixels you want between the text and image. You can also apply vspace="5" to create space above and below the image :).

This is the first time I've acutally ever been able to give coding advice :D.

Suspective
23-07-2009, 07:09 AM
You beat me to it :P

Blob
23-07-2009, 07:40 PM
And when you find the text is right up against the image, add <img src="img.png" align="left" hspace="5"> changing the 5 to whatever amount of pixels you want between the text and image. You can also apply vspace="5" to create space above and below the image :).

This is the first time I've acutally ever been able to give coding advice :D.

Or you could do it the less-failing way;

<img src="img.png" alt="Image" style="float: left; margin-right: 5px;" />

Black_Apalachi
24-07-2009, 02:00 AM
Or you could do it the less-failing way;

<img src="img.png" alt="Image" style="float: left; margin-right: 5px;" />

I find my way easier and it's never failed on me lol.

Blinger1
24-07-2009, 02:24 AM
I find my way easier and it's never failed on me lol.
His way was probably xhtml or what ever.. and looks better :)

Want to hide these adverts? Register an account for free!