Jump to content

how to center <img> within <div> with float <div>s


rupert160

Recommended Posts

hello all,does any body have a good reference to ensure a top centered <img> will float above two floated left and right <div>'s when the window resizes smaller? eg;

+----------+ +----------+  +--------+|          | | <img>    |  |        ||          | +----------+  |        ||          |               |        || <div>    |               | <div>  ||          |               |        ||          |               |        ||          |               |        |+----------+               +--------+         +---------+         |         |         +---------++--------+         +-------+|        |         |       ||        |         |       ||        |         |       ||        |         |       ||        |         |       ||        |         |       ||        |         |       |+--------+         +-------+    +---------+    |         |    +---------++-------+ +-------+|       | |       ||       | |       ||       | |       ||       | |       ||       | |       ||       | |       ||       | |       |+-------+ +-------+

The reason is that the image floats under and the div's get control. <img>generally goes under not over. Thanks guys!

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...