Jump to content

Placing content BEFORE a floated object


gatorrob86

Recommended Posts

This question is about the technique of wrapping text around some object (such as a div or table). My research suggests that using FLOAT is the most common method. Everything I can find about using FLOAT suggests that you have to place the floated div BEFORE the content that you want to wrap around it. This causes a problem for SEO since we want the content to come first. Is there a way to wrap text around an object and have the text come first in the HTML?

Link to comment
Share on other sites

Please post some code that demos the effect you need to produce.

Link to comment
Share on other sites

No, float only works for elements that follow the floated element.What you could do is to float the container of the text though that would require giving it a width.

Link to comment
Share on other sites

All I told you was to change the container you're floating.<div id="column1"></div><div id="column2"></div> Instead of this:

#column2 {    float: left;    width: 300px;}

Do this:

#column1 {    float: right;    width: 500px;}

Of course, some extra margins and other styles will needed to tweak it but you should know how to do that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...