jcombs_31 Posted November 2, 2006 Share Posted November 2, 2006 I have a left column that is floated left. Then I have an image in teh main body that is floated left so that the text will wrap. I need to clear the image float, and not the left column float. How can this be done? If I clear left for my next element, it clears the entire left column which is not what I want. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 4, 2006 Share Posted November 4, 2006 Not totally sure what you are trying to achive here only thing you can do is to use clear:right but that will clear any floated element to the right of course. Maybe put up a link or screen shots of what you are trying to achieve Quote Link to comment Share on other sites More sharing options...
ryan.od Posted November 4, 2006 Share Posted November 4, 2006 I hope I am not insulting you with this solution, but one way to accomplish what I think you are after is to display your text as a block element. Try this. . .[b]CSS[/b]#left{float:left;}#img{float:left;}#text{display:block;}[b]HTML[/b]<div id="left"></div><div id="main"> <img src="images/cart_sm.png" /> <div id="text">Hello, this is some text. Hope it works.</div></div></body>If you don't want to introduce another division, use <p></p> around your text since paragraphs are block elements be default.RyanOD Quote Link to comment Share on other sites More sharing options...
jcombs_31 Posted November 4, 2006 Author Share Posted November 4, 2006 That just clears the text, not the float, I worked out another solution with an extra div that I didn't really want, but acheived the correct result. Toon, you're solution doesn't even make sense. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 4, 2006 Share Posted November 4, 2006 Sorry man! I am still not sure what you're trying to achive. can you put links or screen shots up? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.