473,544 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Floating an image to the bottom right of a div.

I'd like to float an image to the bottom of a DIV containing several
paragraphs, so that it is positioned to the right of the closing
paragraphs (and preferably below the closing paragraphs if the window is
narrow).

ASCII art (needs fixed width font):

|-------------------------|
|Qqqqqqqqqqqqqq qqqqqqqqqqq|
|qqqqqqqqqqqqqq qqqqqqqqqqq|
|qqqqqqqqqqqqqq qqqqqqqq. |
|Qqqqqqqqqqqqqq qqqqqqqqqqq|
|qqqqqqqqqqqqqq qqqqqqqqqqq|
|qqqqqqqqqqq -------------|
|qqqqqqqqqqq | ||
|qqqqqqqq. | ||
|Qqqqqqqqqqq | image ||
|qqqqqqqqqq. | ||
|Qqqqqqqqqqq | ||
|qqqqqqq. -------------|
|-------------------------|

The reason is that all the text is relevant to the image, but it is the
closing paragraphs that bear on it most directly. The total size of the
DIV will probably exceed most readers' windows.

The only way I can think of doing it is to make assumptions about the
reader's window-size / font-size and guess which paragraphs will fit
next to the image - which is exactly what the regulars here try to
avoid.

Any bright ideas?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 21 '05 #1
11 15081
Stephen Poley wrote:
I'd like to float an image to the bottom of a DIV containing several
paragraphs, so that it is positioned to the right of the closing
paragraphs (and preferably below the closing paragraphs if the window is
narrow).
ASCII art (needs fixed width font):
|-------------------------|
|Qqqqqqqqqqqqqq qqqqqqqqqqq|
|qqqqqqqqqqqqqq qqqqqqqqqqq|
|qqqqqqqqqqqqqq qqqqqqqq. |
|Qqqqqqqqqqqqqq qqqqqqqqqqq|
|qqqqqqqqqqqqqq qqqqqqqqqqq|
|qqqqqqqqqqq -------------|
|qqqqqqqqqqq | ||
|qqqqqqqq. | ||
|Qqqqqqqqqqq | image ||
|qqqqqqqqqq. | ||
|Qqqqqqqqqqq | ||
|qqqqqqq. -------------|
|-------------------------|
Any bright ideas?


you have to use <table>'s still.
In the cell put the vertical-align css-attribute to the bottom, float
your image to the right and pump your text in that cell.
Just an idea, didnt test it. Tables are needed for broadreach
presentation amongst browsers. Current CSS standards and their support
isnt still very suitable for doing complex layouts.

HTH
Jul 21 '05 #2
Marek Mänd wrote:
Stephen Poley wrote:
I'd like to float an image to the bottom of a DIV containing
several paragraphs, so that it is positioned to the right of the
closing paragraphs (and preferably below the closing paragraphs if
the window is narrow).

you have to use <table>'s still. In the cell put the vertical-align
css-attribute to the bottom, float your image to the right and pump
your text in that cell.


That requires making assumptions about the user's font size. How many
paragraphs should go in the top row? How many in the bottom? (I'm
assuming you propose using more than one row, else why use <table>? Your
"solution" is rather vague in the specifics.
Just an idea, didnt test it.
Apparently not.
Tables are needed for broadreach presentation amongst browsers.
Current CSS standards and their support isnt still very suitable for
doing complex layouts.


Before making that claim, you could at least provide a demonstration.

--
Brian (remove "invalid" to email me)
Jul 21 '05 #3
Brian wrote:
Marek Mänd wrote:
Stephen Poley wrote:
I'd like to float an image to the bottom of a DIV containing several
paragraphs, so that it is positioned to the right of the closing
paragraphs (and preferably below the closing paragraphs if the window
is narrow). you have to use <table>'s still. In the cell put the vertical-align
css-attribute to the bottom, float your image to the right and pump
your text in that cell.

That requires making assumptions about the user's font size.


Yes, but he will probably have sufficient amount of the lines.
How many
paragraphs should go in the top row? How many in the bottom? (I'm
assuming you propose using more than one row, else why use <table>? Your
"solution" is rather vague in the specifics.


yes more than one, besides the OP drew the picture so too.
Just an idea, didnt test it.

Apparently not.

Tables are needed for broadreach presentation amongst browsers.
Current CSS standards and their support isnt still very suitable for
doing complex layouts.

Before making that claim, you could at least provide a demonstration.


The most spread browser MSIE doesnt support attribute display:table*
values. There is no other way doinging it. He could position the image
absolutely to the righght bottom corner, but absolutely psoitioned
element will be nicely where he should be, but the bad ews would be taht
the text would partly be under it. Thus the table solutuon is IMHO the
only right working one.

And your solutions on the subject are WHERE?

If you are so against tables and are aparently much more skillful than I
am on the subject of CSS, then
PELASE DO ANSWER MY QUESTION

"100% heighted table in 100% heighted table cell".
dated 15.10.2004 with message id <2t************ *@uni-berlin.de>
Jul 21 '05 #4
"Stephen Poley" <sb************ ******@xs4all.n l> wrote in
comp.infosystem s.www.authoring.stylesheets:
I'd like to float an image to the bottom of a DIV containing several
paragraphs, so that it is positioned to the right of the closing
paragraphs (and preferably below the closing paragraphs if the window is
narrow).

The reason is that all the text is relevant to the image, but it is the
closing paragraphs that bear on it most directly. The total size of the
DIV will probably exceed most readers' windows.

Any bright ideas?


Not very bright, but permission to be imperfect. :-)

Why not just float the image to the right of the first of those
"closing paragraphs" that it's most relevant to? If there's white
space below the image, or below the last paragraph, well, that's the
nature of the Web.

Like you, I can't see any way to do it nicely without making
assumptions about the viewer's font and screen.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Jul 21 '05 #5
=?ISO-8859-1?Q?Marek_M=E4n d?= wrote;
And your solutions on the subject are WHERE?


There is no real solution, I believe. It is impossibe whiout programming
at the moment I think. Floating is no an option, neither is table. This
is thought many times before, and nobody has come up with idea.

Feel free to show me wrong, but dont make up any bullshit about
tables/CSS

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 21 '05 #6
Lauri Raittila wrote:
=?ISO-8859-1?Q?Marek_M=E4n d?= wrote;
And your solutions on the subject are WHERE? There is no real solution, I believe. It is impossibe whiout programming
at the moment I think.


I agree completely
Floating is no an option, neither is table. This
is thought many times before, and nobody has come up with idea.
what does it say?
It does say css2 has failed as a real world application.

Feel free to show me wrong, but dont make up any bullshit about
tables/CSS


well table cell with floating was the most bets visual markup to achieve
the goal. I doslike tables too, therefor I dpnt do round corners and
nice borders around boxes...

ok, but what does the css3 draft say about that OPs problem?
Jul 21 '05 #7
=?ISO-8859-1?Q?Marek_M=E4n d?= wrote;
Lauri Raittila wrote:
=?ISO-8859-1?Q?Marek_M=E4n d?= wrote;
And your solutions on the subject are WHERE? There is no real solution, I believe. It is impossibe whiout programming
at the moment I think.
I was thinking this:
http://www.student.oulu.fi/~laurirai...ttomfloat.html

But overflow doesn't make paragraphs wrap when image is over them. (and
no browser even gets the image over paragraph, even if that should
happen)

Mozilla gets nearest here, I think. Tested on Firebird, maybe they have
fixed something? (I wouldn't be surprised if they had intentionally
broken their float handling...)
Floating is no an option, neither is table. This
is thought many times before, and nobody has come up with idea.


what does it say?
It does say css2 has failed as a real world application.


Well, maybe you just have negative attitude. There is nothing that hasn't
failed as a "real world application" by your standards, or is there?
Feel free to show me wrong, but dont make up any bullshit about
tables/CSS


well table cell with floating was the most bets visual markup to achieve
the goal. I doslike tables too, therefor I dpnt do round corners and
nice borders around boxes...


But it doesn't work. BTW, round corners and nice borders are easier
whiout tables, and doesn't usually break anything, unlike tables.
ok, but what does the css3 draft say about that OPs problem?


Don't know, haven't seen anything that would change the situation, but I
haven't looked since maybe last spring.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 21 '05 #8
Marek Mänd wrote:
Brian wrote:
Marek Mänd wrote:
Stephen Poley wrote:

I'd like to float an image to the bottom of a DIV containing
several paragraphs, so that it is positioned to the right of
the closing paragraphs

Tables are needed for broadreach presentation amongst browsers.
Current CSS standards and their support isnt still very suitable
for doing complex layouts.
Before making that claim, you could at least provide a
demonstration.

The most spread browser MSIE doesnt support attribute display:table*
values.


The point that I questions is that "Tables are needed for broadreach
presentation amongst browsers." CSS can do things that <table> markup
can not, and does not require lying about the markup.
And your solutions on the subject are WHERE?
I can't see a css solution to the problem as stated in the op.

Neither have you provided a solution using tables. If he were going to
put some paragraphs in one <tr>, and some in another <tr> along with the
image, why not just skip all the pointless <table> markup, put the image
in the last paragraph, and float it? In other words, how does <table>
markup provide anything useful here?
If you are so against tables
I am not. For data, I am for tables. For layout, they are a poor tool.
PELASE DO ANSWER MY QUESTION
Please stop shouting.
"100% heighted table in 100% heighted table cell".


What tabular data do you have the requires nested tables?

--
Brian (remove "invalid" to email me)
Jul 21 '05 #9
Lauri Raittila wrote:
=?ISO-8859-1?Q?Marek_M=E4n d?= wrote;
what does it say?
It does say css2 has failed as a real world application.
Well, maybe you just have negative attitude. There is nothing that hasn't
failed as a "real world application" by your standards, or is there?
I like standards, but there are quite some shortcomings in css.

the example for this failure are the css border styles, which everybody
interpret differently. The colours, plus the dashed, dotted pattern
differences. The css should ought to have provide a extended possibility
for the designer to specify the pattern bitmap.
Plus the table columns should spread the padding-left and padding-right
values to the cells (like by MSIE from ancient times)...
[] BTW, round corners and nice borders are easier
whiout tables, and doesn't usually break anything, unlike tables.


I dont know how it is possible to assign a pattern image to the border.
So it isnt easy at all. Regarlsess of tables or no tables.
Nobody needs absolutely positioned roundcorner images etc
All we see much right now are deeply nested DIVs to achive some visual
effects. This shouldnt be so. Therefore my negativism about "failing
standards in real use cases if the forthcoming standard woould match the
real life needs".

ok, but what does the css3 draft say about that OPs problem?

Don't know, haven't seen anything that would change the situation, but I
haven't looked since maybe last spring.


the border radiuses are too little for web,
The forthcoming standards should include pattern images
definable round corner images, position:fixed-x; position:fixed-y;
margins between tbodies, tbody-thead-tfoot etc.

otherwise the satndard has failed, because all we can see in net 10
years is again workarounds an hacks to achive smth that would have been
elementary if we only had css attributes for them.

Du to the cumulative nature of the rules and amount of attributes, it is
to be claimed speculatively, that the possible CSS 4 standard will be
written after 10 years. So it is reasonable to have such things included
right NOW. Becasue later is too late in the sense of sufferings by
creating web pages the next 10 years.
Jul 21 '05 #10

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

Similar topics

2
3386
by: Chris Gurk | last post by:
Hi Newsgroup, I am working on a website http://www.charter-yachtcharter.com/testsite/ (still in progress). There are two lists. The first is a simple paragraph (<p>-Tag), the second an unordered list. How can I use a Style-Sheet to format the bullets to be aligned like the text above. The problem is the floating catamaran-image which is...
4
11964
by: mercurius_1 | last post by:
I want to put text for a copyright notice into the bottom right corner of my page. When I say "bottom right," I mean that it will float there regardless of how the browser window is resized. I _think_ that what I have so far works well for this positioning purpose: <p class="copyright">All materials on this website &copy; Copyright...
2
1665
by: csgraham74 | last post by:
Hi guys, I ve created a web control - i want to make sure that it always sits at the very bottom of the browser screen. How can i achieve this. Ive been playing about with tables etc.. in html but moving the vertical align affects all other controls tables etc. on the screen. basically can i force a control or table to be at the bottom of...
9
3704
by: edski | last post by:
Using a technique I found here: http://www.vertexwerks.com/tests/sidebox/ I created these "dialogue" boxes: http://www.ebph.org/test.htm In IE6, the text does not wrap correctly around the image, which is floated right. Any ideas / suggestions?
5
9570
by: Kevin Stone | last post by:
Hi, I'm after a script that will keep a DIV in the bottom right of the visible area. Needs to work in all browsers. TIA --
31
2921
by: Martin Clark | last post by:
Hello, I am daring to stick my head above the parapet and ask as question. I am working on redesigning a website to use CSS rather than tables for layout. I have come across a problem when trying to float an image to the right. For ease of looking at the problem, I have stripped away other parts of the page layout, and have just included...
4
5240
by: Andre Majorel | last post by:
How do you align an <imgagainst the bottom-right corner of an enclosing block so that the text in the block flows around it ? <!-- Block begins here --> <p> En ce qui concerne la conjoncture qui nous occupe, il est nécessaire d'imaginer l'ensemble des problématiques déjà en notre possession. Où que nous mène la sinistrose de cette fin...
8
2288
by: crazychrisy54 | last post by:
Hi there I am quite new to web technologies and wondered if there is anything available so that when a large web page is opened (containing scroll bars) you are automatically scrolled down and right to the contents within the bottom right hand corner of the page. Any ideas if this is possible and if so how would be very much appreciated
1
3365
by: babashankar | last post by:
Hi, I have a simple html as below: <html> <body> <table><tr> <td style="background:#DD6D68" width="100" height="100"> <div>image name</div> <div style="vertical-align:bottom;float:right;">
1
7387
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7714
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5920
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5305
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3415
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1848
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
674
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.