473,395 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Text wrap around positioned float

I'm using relative positioning to move a right-floated image 10px upwards..
Text wrapping around the image should go underneath it once it reaches the
bottom of the image, yet it acts as if the image is still in it's original
position and doesn't start wrapping until it's 10px below the bottom of the
image. How can I work around this?

TIA,
Aaron
Jul 20 '05 #1
1 3494
"Aaron" <ag********@comcast.net> wrote in
news:AL********************@comcast.com:
I'm using relative positioning to move a right-floated image 10px
upwards.. Text wrapping around the image should go underneath it once
it reaches the bottom of the image, yet it acts as if the image is
still in it's original position and doesn't start wrapping until it's
10px below the bottom of the image. How can I work around this?


Use a negative margin (margin-top: -10px) rather than relative positioning.
With relative positioning, all layout is done as if the positioned element
were in its static position (i.e. where it would have been if it hadn't
been positioned) and then the positioned element is moved *without*
reflowing anything. Negative margins, OTOH, *are* taken into account
during layout.

So in this case, the rendering engine correctly refuses to flow text into
the space that will be vacated when the image is moved by relative
positioning since that space won't be vacant until after the move is done.
With the negative margin, however, the space becomes available at the time
the text-flowing is being done and therefore the rendering engine, again
correctly, flows text into the space.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Xerxes | last post by:
Hi, I need help in setting up a page where the text wraps around an image. Right now, I am using table, with text in one <td> and the image in the adjacent <td>. The problem is when the text is...
2
by: Suzanne Boyle | last post by:
I have the following code in a webpage: <p><img src="images/clydesdale.gif" width="100" height="41" style="float: left;" /> <strong>Test</strong><br /> Lorem ipsum dolor sit amet, consetetur...
10
by: Dan V. | last post by:
Is it possible to have 2 divs beside each other and one not wrap around? I realize the 2 div's are floating left but I can only think of this as the best solution for now. I am trying to get...
2
by: zahirbar | last post by:
Hi, I have an image with a basically a big round circle (a photo). How do i make the text wrap around it fully? I use dreamweaver. Thanks
1
by: maya | last post by:
hi, I have to do a page where there's a paragraph with an img on top left and the text in paragr has to wrap around the image.. pls see screen-shot here......
1
by: laura.paterson | last post by:
Hi, I'm new to html, and having difficulty getting my text to wrap around an image the way I'd like it to.. I have an image in the top left corner of a component, and if there is space, I'd...
14
by: Zhang Weiwu | last post by:
Hello. I have been using word processor like OOO for nearly 10 years and such layout is very usual to me: gopher://sdf.lonestar.org/I/users/weiwu/ooo_wrap_correctly.png but I found it's very...
8
by: Jonathan Sachs | last post by:
I'm trying to compose a list of items, each of which consists of text that wraps around a picture at the left margin. The examples I have seen tell me to do it like this: <p><img src="xxxx.jpg"...
8
by: Skeer | last post by:
This is what I'm having problems with: I have a image that is in an absolute positioned div at the bottom left of my content. I want the content to be full width until reaching the image then wrap...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.