...

View Full Version : CSS - Image in Paragraph Help!!!



FADiJohn
10-07-2007, 08:43 PM
Hello, what I am trying to accomplish is hard to explain so I'm going to give you guys/gals a link to help you understand what I'm asking:

http://websitedesign.ashtonsanders.com/2007/06/css-paragraph-indent-text.html

See on the right side of the page in the "About Me" section? What I'm trying to do on my own site is exactly what he did right there in regards to the text being wrapped around that small square logo. I'm trying to do this via CSS so no tables please! :)

If you have any questions which would in turn help answer my question, please let me know!

Thank you very much in advance!

-Frank

BarrMan
10-07-2007, 08:53 PM
Ok, This is pretty simple:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>
<style type="text/css">
#Container
{
width: 400px;
}
#LeftSide
{
float: left;
}
#RightSide
{
float: right;
width: 200px;
border: 1px solid black;
}
#AboutMe
{
height: 300px;
}
#img_aboutme
{
float:left;
}
</style>
</head>

<body>
<div id="Container">
<div id="LeftSide">
Some text here
</div>
<div id="RightSide">
<div id="AboutMe">
<img src="http://www.websitesinaflash.com/images/logos/logo4_square.jpg" id="img_aboutme" /> Some more text here hereSome more text here hereSome more text here hereSome more text here hereSome more text here here
</div>
</div>
</div>
</body>
</html>


This should work.

FADiJohn
10-07-2007, 10:42 PM
Thank you so much! It worked perfectly!

I thought you had to use the 'display' property, making the image or the paragraph set to 'display:inline;'. But I guess not!

Thanks again,
-Frank

GO ILLINI
10-08-2007, 02:36 AM
Images are already set to 'inline' automatically.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum