473,405 Members | 2,300 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,405 software developers and data experts.

Float a <div> in bottom right corner of paragraph


Hi,
I'm trying to work out how to float a <divbox in the lower right
corner of a paragraph. I have no trouble getting it to work in the
upper right or upper left corners and having the text wrap around the
box as expected: ie

AA XXXXXXXXXXXXXXX
AA XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX

or

XXXXXXXXXXXXX AA
XXXXXXXXXXXXX AA
XXXXXXXXXXXXXXXX

What I want, however, is:

XXXXXXXXXXXXXXXX
XXXXXXXXXXXXX AA
XXXXXXXXXXXXX AA

I have tried using position:relative and top:, but while this moves the
box (AA) to where I want, the text (XX) doesn't wrap around it -- it
runs through/behind it. Using a margin:top or padding-top: value
results in a different problem, where the text XX no longer runs over
the box, like this:

XXXXXXXXXXXX
XXXXXXXXXXXX AA
XXXXXXXXXXXX AA

How do I do this? It seems like the normal behavior is for the top of
the floated box to be aligned with the top of the first line of the
parent container. So how do I get it so the bottom line is aligned
with the bottom line of the parent instead?

Jeff

Jul 24 '06 #1
2 5828
Els
J Rice wrote:
Hi,
I'm trying to work out how to float a <divbox in the lower right
corner of a paragraph.
[snip]
How do I do this? It seems like the normal behavior is for the top of
the floated box to be aligned with the top of the first line of the
parent container. So how do I get it so the bottom line is aligned
with the bottom line of the parent instead?
You don't. It just doesn't work.

--
Els http://locusmeus.com/
Jul 24 '06 #2

Els wrote:
J Rice wrote:
Hi,
I'm trying to work out how to float a <divbox in the lower right
corner of a paragraph.

[snip]
How do I do this? It seems like the normal behavior is for the top of
the floated box to be aligned with the top of the first line of the
parent container. So how do I get it so the bottom line is aligned
with the bottom line of the parent instead?

You don't. It just doesn't work.
Aha. I wonder if that explains why I haven't been able to figure it
out.

Jul 25 '06 #3

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

Similar topics

1
by: Philo | last post by:
How do I select all <div> tags except those which contain a <table> tag somewhere within them? Example XML: <********************** sample input ***********************> <txtSectionBody>...
23
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
19
by: Kim André Akerø | last post by:
For some reason, I can't get the middle column of this setup to work properly in IE (go figure). It looks like it's supposed to in Opera and Firefox, but now I only need it to work in IE as well. ...
28
by: Kent Feiler | last post by:
1. Here's some html from a W3C recommendations page. <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</DIV> 2.Although I didn't think it would make any difference, I tried it with the...
2
by: Richard Maher | last post by:
Hi, I'm trying to use the Visibility Style attribute for a Div to effectively PopUp a lightweight window with some additional context-sensitive information, when a user mouses over a given...
1
by: milas57 | last post by:
hello everyone i have a homepage which introduce the company website as shown below im having trouble to find some javascript code when i click on the header link like servives the body content...
2
by: bgold12 | last post by:
Are there any non-semantic (i.e. actual) differences between the <p> tag and the <divtag?
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.