Advanced Search Usage Terms Submit Contact
Dynamic Drive CSS Library
 
CSS Library
Submit an original CSS code
CSS Layouts
Web Graphics
Online Tools:

Advertise Here

CSS Library: Image CSS: Here

Floating image with no text wrap

Author: Dynamic Drive

By default, floating an image causes the surrounding text to wrap around it, such in in the below example:

A safari park is a large nature reserve intended for safari tours and encounters with rare wildlife. They are common in Africa, but many exist elsewhere, including popular parks in England. People who wish to see animals in their natural state will love a trip to the safari.

However, sometimes you may want a different effect whereby the image floats, yet the surrounding content do NOT wrap around the image. This can be accomplished through the familiar "float" attribute, combined with "margins", while taking into account IE'6 dreadful "3px text-jog bug". The result is:

A safari park is a large nature reserve intended for safari tours and encounters with rare wildlife. They are common in Africa, but many exist elsewhere, including popular parks in England. People who wish to see animals in their natural state will love a trip to the safari.

The CSS:

The HTML:

Code Info

Rate this code:

Date Posted: 05/02/2006

Revision History: None

Usage Terms: Click here

Your Comments (71)

Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.

Comment Pages 5 of 7 pages « First  <  3 4 5 6 7 >

Very informative! I just love it ..... well i don't have any doubt about your articles... your posts are awesome... Honestly you are simply the best.Thanks for sharing this in your post with us. This a definitely a very good read for me!Keep posting
This was one problem tat I was trying to solve for sometime now,just checked out help and u gave me THE SOLUTION!!!!!Quite a good piece of info thr,Thanks!!All the best!
Posted by Dhanniya on 01/14, 01:32 AM
You are really did a good job.I use this code and checked in different browsers.It is works finely in all browsers.Its helps for every programmer.I admire the valuable information you offer in your articles.Keep posting...cheer:)!!
I hated IE's "3px text-jog bug"...drove me nuts!
Posted by dtv on 01/22, 06:56 PM
Such interesting read and information, thanks for sharing this post, I’ve already bookmarked your blog.
I can see that you are putting a lot of time and effort into your blog and detailed articles!
I am deeply in love with every single piece of information you post here. Will be back often to read more updates!
Posted by Computers Software on 02/11, 01:03 PM
I was surfing when I passed by your website. I must admit that I really enjoyed the quality information you offer to your visitors... Will be back often to check up on new stuff you post here!
Disk encryption software - Powerful encryption software with pre-boot authentication secures 100% of your hard disk drive, including the OS.
Posted by Disk encryption software on 02/27, 03:00 PM
you got here! I would like to thank you for sharing your thoughts and time into the stuff you post!! Photography Templates
Posted by Photography Templates on 03/15, 03:17 AM
I admire the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up! illy review
Posted by illy on 03/27, 06:06 AM
I can't get the html code to work...it just shows everything instead of being able to hover!!! HELP!!!
Posted by Stevie Hofer on 04/12, 08:30 AM
Thanks,
Magazine Theme
Posted by Wordpress Theme on 04/15, 07:06 AM

Comment Pages 5 of 7 pages « First  <  3 4 5 6 7 >

Commenting is not available in this weblog entry.
Copyright 2006-2008 Dynamic Drive Read our Usage Terms before using any of the CSS codes.
Dynamic Drive DHTML and CSS Code Library