473,666 Members | 2,296 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bottom-right corner

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 de siècle, il ne faut pas négliger d'examiner la
globalité des solutions s'offrant à nous. Dans le cas
particulier de l'inertie induite, il serait intéressant de
se préoccuper de chacune des voies possibles.
</p>

<img src="img.png" alt="Your ad here">

<!-- Block ends here -->

<hr>

<p>
Blah
</p>

Rendered as :

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
de siècle, il ne faut pas négliger d'examiner
la globalité des solutions s'offrant à nous. +-------------+
Dans le cas particulier de l'inertie induite, | Your ad |
il serait intéressant de se préoccuper de | here |
chacune des voies possibles. +-------------+

=============== =============== =============== =============== ==

Blah

Thanks in advance.

--
André Majorel <URL:http://www.teaser.fr/~amajorel/>
(Counterfeit: on****@sinuous. com wu***@buckthorn .com)
"Duty, honor, country" -- Douglas MacArthur
"Travail, famille, patrie" -- Philippe Pétain
May 23 '07 #1
4 5243
On 2007-05-23, Andre Majorel <ch****@hallibu rton.comwrote:
How do you align an <imgagainst the bottom-right corner of an
enclosing block so that the text in the block flows around it ?
I don't think it's possible unless you are prepared to predetermine the
height of the enclosing block. If you are, you just make the <img>
float: right, put it inside the block before any of the text, and set
its top margin to align it to the bottom of the container.

The problem is if you want text flowing around the <img>, the <imghas
to be a float. Nothing else affects the text flow in the same way. But
if it's a float, you can't also absolutely position it (since position:
absolute implies float: none).
>
<!-- 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 de siècle, il ne faut pas négliger d'examiner la
globalité des solutions s'offrant à nous. Dans le cas
particulier de l'inertie induite, il serait intéressant de
se préoccuper de chacune des voies possibles.
</p>

<img src="img.png" alt="Your ad here">

<!-- Block ends here -->

<hr>

<p>
Blah
</p>

Rendered as :

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
de siècle, il ne faut pas négliger d'examiner
la globalité des solutions s'offrant à nous. +-------------+
Dans le cas particulier de l'inertie induite, | Your ad |
il serait intéressant de se préoccuper de | here |
chacune des voies possibles. +-------------+

=============== =============== =============== =============== ==

Blah

Thanks in advance.
May 23 '07 #2
Andre Majorel wrote:
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 de siècle, il ne faut pas négliger d'examiner la
globalité des solutions s'offrant à nous. Dans le cas
particulier de l'inertie induite, il serait intéressant de
se préoccuper de chacune des voies possibles.
</p>

<img src="img.png" alt="Your ad here">

<!-- Block ends here -->
img { float: right; }
<p>Blah, blah, yadda. <img .... Yadda, yadda, blah.</p>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
May 23 '07 #3
On 2007-05-23, Ben C <sp******@spam. eggswrote:
On 2007-05-23, Andre Majorel <ch****@hallibu rton.comwrote:
>How do you align an <imgagainst the bottom-right corner of an
enclosing block so that the text in the block flows around it ?

I don't think it's possible unless you are prepared to predetermine the
height of the enclosing block. If you are, you just make the <img>
float: right, put it inside the block before any of the text, and set
its top margin to align it to the bottom of the container.

The problem is if you want text flowing around the <img>, the <imghas
to be a float. Nothing else affects the text flow in the same way. But
if it's a float, you can't also absolutely position it (since position:
absolute implies float: none).
Thanks. A float with a relative position would be fine, if it
were relative to the bottom right corner of the enclosing block.
I didn't find a way to do that with CSS 2. Oversight or left out
because it was hard to implement ?

--
André Majorel <URL:http://www.teaser.fr/~amajorel/>
(Counterfeit: ox**@therefor.c om ip****@demur.co m)
"Duty, honor, country" -- Douglas MacArthur
"Travail, famille, patrie" -- Philippe Pétain
May 24 '07 #4
On 2007-05-24, Andre Majorel <ch****@hallibu rton.comwrote:
On 2007-05-23, Ben C <sp******@spam. eggswrote:
>On 2007-05-23, Andre Majorel <ch****@hallibu rton.comwrote:
>>How do you align an <imgagainst the bottom-right corner of an
enclosing block so that the text in the block flows around it ?

I don't think it's possible unless you are prepared to predetermine the
height of the enclosing block. If you are, you just make the <img>
float: right, put it inside the block before any of the text, and set
its top margin to align it to the bottom of the container.

The problem is if you want text flowing around the <img>, the <imghas
to be a float. Nothing else affects the text flow in the same way. But
if it's a float, you can't also absolutely position it (since position:
absolute implies float: none).

Thanks. A float with a relative position would be fine, if it
were relative to the bottom right corner of the enclosing block.
I didn't find a way to do that with CSS 2. Oversight or left out
because it was hard to implement ?
"position: relative" is actually not relative to the container at all,
but relative to the box's normal flow position. It's like the box is
laid out as normal, and then translated by its relative offset at the
last minute, leaving a gap where it used to be.

But in your case you don't want that because the text would flow around
the gap, not around the new position of the float.

So position: relative is no good. You could get the float into position
with position: relative by starting a new block box after the paragraph,
putting the float as a float:right in there, and using the top property
to move it up by its own height. But it won't work, because the text
won't flow around it in its new position.

With position: absolute you can position relative to the bottom corner
of the container (just use bottom: 0; right: 0). But if it's position:
absolute it stops being a float.

You can do it with JavaScript of course as was recently suggested.
May 24 '07 #5

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

Similar topics

82
10671
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | | | | | | | | left | center | right | | | | | | | | |
5
14392
by: Tyler Carver | last post by:
I've tried to get CSS to give me a basic layout where I can place a footer at the bottom of the page and the top of the page I can use for content. I don't however want the footer to pull away from the bottom of the viewport if the top content is small. Also, when I resize the window I want the footer to move with the bottom of the page until I reach the content. Here is an example that works both in IE and Mozilla using tables. I...
3
48414
by: Michael Goldbach | last post by:
Hi, I'm currently encountering a problem with vertical alignment of text in a DIV that drives me mad. I'm having a DIV with a fixed height (say 50px) which contains some text from which I don't know if it will be rendered in one line or two. But that text should absolutely be bottom-aligned since the space between the bottom border-line and the text must always be the same and
6
6104
by: George Hester | last post by:
I have this DIV at the very bottom of a html. <head> <style type="css/text" media="all"> <!-- #oFoot { position: relative; left: 0px; width: 100%; height: 50px; filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr='#FF0000', endColorStr='#FCCCCF', gradientType='0');
12
2147
by: S | last post by:
Here's a very basic question. . . I have a DIV that contains content that I need to be bottom-justified. What is the CSS code to do that? Thanks, ---------------S
3
2310
by: | last post by:
I want a banner to appear at the bottom of each page of a web app. I created a user control that describes the banner and have it placed in all my pages. For the most part it functions as needed. The exception is when the content of the web page is longer than the screen. The user has to scroll for the full content, but the bottom banner still appears at the bottom of the screen, so it appears across the main body content on small...
7
2175
by: Trammel | last post by:
Im trying to do something which I hoped would be alot easier than it seems. Im trying to design the layout of the page in CSS to avoid table, etc but having problems making the bottom "fade" background actually stick to the bottom of the page. Try making your browser window small... then scroll down & see how ugly it looks. ....now try resizing your browser & notice the wierd behavior. It also reacts differently in IE & FF (Which is...
23
1707
by: Antoon Pardon | last post by:
I know this PEP is rejected. However I have a problem that would benefit from having extreme values and the sample implementation that is given in the PEP is unsatifactory for my purpose. I had written my own module, which works similarly but is somewhat extended. Here is an example of how it can be used and how I would like to use it but get stuck. from extreme import Top
4
29376
by: john | last post by:
Hi to All, I am new to html authoring, so sorry if my terminology is not correct or exact. I would like to position a footer div to the bottom of the browser window. As I research in the web shows this could be done a containing element with "min-height: 100%;" and an absolute positioned element (div) inside, aligned to bottom ("position: absolute; bottom:0px")
3
5625
by: kk.simhadri | last post by:
Hi, I want to align some text to the bottom of page.I am doing this by a CSS class.It contains position:absolute; bottom:0; this does the purpose. but when I resize my page to smaller size, the text at the bottom overlaps my text written in the page above it.
0
8866
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8638
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7381
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4193
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4365
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1769
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.