PDA

View Full Version : div styles


rico1931
06-22-2009, 06:57 PM
Hi guys I just noticed a problem.. I have a Div right and i give it styles.. now my problem is within this div I have both content and imgs. I want to text to be aligned left and the img to be aligned right so I thought something like this would work

<div styles = text-align:Left>
content goes here
<img src="/img/path" align="right" />

but the text-align:left in the div styles is making everything in the div align left .. anyone know what the deal is?

thanks
-X

Corrosive
06-22-2009, 07:03 PM
Hi guys I just noticed a problem.. I have a Div right and i give it styles.. now my problem is within this div I have both content and imgs. I want to text to be aligned left and the img to be aligned right so I thought something like this would work

<div styles = text-align:Left>
content goes here
<img src="/img/path" align="right" />

but the text-align:left in the div styles is making everything in the div align left .. anyone know what the deal is?

thanks
-X

Either float the image left or right accordingly or, if you don't want the text to wrap the image then use two divs.

DWcourse
06-22-2009, 07:55 PM
And, if you float the image, put it in front of the text.

rico1931
06-22-2009, 08:59 PM
got ya thanks guys!