PDA

View Full Version : place image next to text in just css



char
Feb 19th, 2010, 11:29 AM
i am trying to place an iamge before the text like this in divs eg css

http://img265.imageshack.us/img265/8676/screenshot20100217at170.png



i have added the fellowing code and i cant seem to get it right

css

#contentareabox{
background-color:#000;
height:auto;
font-size:18px;
border: 1px solid #494949; margin: 12px; padding: 6px; font-size: 14px; text-transform: capitalize; color: #676767; background-color: #000000;
height:auto;
}

i have treid putting both the text and images in an div and floating them both left but that dont seem to work any ideas how i can do this its start to bug me lol


thank you for your help

Excavator
Feb 19th, 2010, 11:44 AM
Hello char,
Maybe this will give you a little help - http://nopeople.com/CSS/image%20captions/index.html

It could also be as easy as wrapping both image and text in p tags.