Further to my last post, here is a little mock up:
<style>
img { border: 1px solid black; float: left; }
ul {margin:0; padding:0}
li {list-style-type:none; padding: 0; margin: 0}
p { display: inline}
</style>
<div style="width: 160px;border: 1px solid black;">
<ul>
<li><a href="#"><img src="blah.jpg" width="40" height="40"><p>this is some text
here so it is to be sure and begosh begorahh isnt it lovely.</p></a></li>
</ul>
</div>
My main problem is that the text wraps underneath the image. Anyone got any
ideas on how to stop it happening?
Cheers
________________________________
From: [EMAIL PROTECTED] on behalf of stu
Sent: Wed 29/06/2005 14:33
To: [email protected]
Subject: [css-d] Floating images and text in lists
Hi again folks.
I am creating lists that contain text and images, with the image needing to
float to the left and the text needeing to float to the right. All this image
text is wrapped around a href that changes background colour when moused over.
I am having numerous difficulties with this - getting the text to float to the
right of the image without wrapping it aruond a div and so on. Does anyone have
any good examples or pointers.
Here is the kind of thing I am trying to create:
<ul>
<lI><a href="#"><img src="blah.gif">this is some text that could be really long
and should display to the right of the image and not wrap underneath it if the
text is longer than the image in height</a></li>
</ul>
Can this be done gracefully, at the moment i have done it, just not using
lists...and i feel they are the correct way to do things.
Thanks for your help.
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/