473,657 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

aligning text to image

Dear NG-readers,

I want to align text right to an image. The last line of text should
align with the bottom edge of the image. Unfortunately, the results
using my poor CSS knowledge mounted in text which starts at the bottom
line of the image and continues below. For an example go here:
http://tomasio.at/temp/test_valign.html

I want to achieve the following look:
http://tomasio.at/temp/correct.html

Does anybody could give me a hint what I am doing wrong?

kind regards,
--
tomasio
Feb 27 '06 #1
6 2004
Once upon a time *tomasio* wrote:
Dear NG-readers,

I want to align text right to an image. The last line of text should
align with the bottom edge of the image. Unfortunately, the results
using my poor CSS knowledge mounted in text which starts at the bottom
line of the image and continues below. For an example go here:
http://tomasio.at/temp/test_valign.html

I want to achieve the following look:
http://tomasio.at/temp/correct.html

Does anybody could give me a hint what I am doing wrong?

kind regards,


Something like this may work?

<div class="indent"> <img src="images/jan_bild.jpg"
style="float: left; margin-right: 10px;" alt="image" height="150"
width="145">
<p style="margin-top: 60px;">this text
should float the image on theleft side, but the last line of text
should end with the bottom line of
the image.</p>
</div>

--
/Arne

Now ignoring all top posters
* How to post: http://www.cs.tut.fi/~jkorpela/usenet/brox.html
-------------------------------------------------------------
Feb 27 '06 #2
On Mon, 27 Feb 2006 15:17:20 +0100, Arne <in*****@domain .invalid>
wrote:
Once upon a time *tomasio* wrote:
Dear NG-readers,

I want to align text right to an image. The last line of text should
align with the bottom edge of the image. Unfortunately, the results
using my poor CSS knowledge mounted in text which starts at the bottom
line of the image and continues below. For an example go here:
http://tomasio.at/temp/test_valign.html

I want to achieve the following look:
http://tomasio.at/temp/correct.html

Does anybody could give me a hint what I am doing wrong?

kind regards,


Something like this may work?

<div class="indent"> <img src="images/jan_bild.jpg"
style="float : left; margin-right: 10px;" alt="image" height="150"
width="145">
<p style="margin-top: 60px;">this text
should float the image on theleft side, but the last line of text
should end with the bottom line of
the image.</p>
</div>

Thanks a lot, Arne, that is a step towards the solution of the desired
layout. The problem is, as soon as the text is changing in its size,
the alignment is not correct any more. Is there a possibility to keep
the text to the bottom edge of the image no matter what amount of text
I enter?

kind regards,
--
tomasio
Feb 27 '06 #3
tomasio <fr*********@bl ed.de> wrote:
I want to align text right to an image. The last line of text should
align with the bottom edge of the image. Unfortunately, the results
using my poor CSS knowledge mounted in text which starts at the bottom
line of the image and continues below. For an example go here:
http://tomasio.at/temp/test_valign.html

I want to achieve the following look:
http://tomasio.at/temp/correct.html


<title>CSS Tutorial</title>?

Doing this "properly" requires browser support for CSS tables (not
supported by IE): http://homepage.ntlworld.ie/spartanicus/temp.htm

--
Spartanicus
Feb 27 '06 #4
On Mon, 27 Feb 2006 14:33:06 +0100, tomasio <fr*********@bl ed.de>
wrote:

: Dear NG-readers,
:
: I want to align text right to an image. The last line of text should
: align with the bottom edge of the image. Unfortunately, the results
: using my poor CSS knowledge mounted in text which starts at the bottom
: line of the image and continues below. For an example go here:
: http://tomasio.at/temp/test_valign.html
:
: I want to achieve the following look:
: http://tomasio.at/temp/correct.html
:
: Does anybody could give me a hint what I am doing wrong?
If it were me, I would use tables. Of course I use CSS as well, but
for this application, what could be simpler?

<table cellpadding=6>
<tr>
<td>the image</td>
<td valign=bottom>t he text</td>
</tr>
</table>

Set width of TDs and Table to taste. Serves a good page.

Sid


Feb 27 '06 #5
On Mon, 27 Feb 2006 15:33:06 GMT, Spartanicus
<in*****@invali d.invalid> wrote:
tomasio <fr*********@bl ed.de> wrote:
I want to align text right to an image. The last line of text should
align with the bottom edge of the image. Unfortunately, the results
using my poor CSS knowledge mounted in text which starts at the bottom
line of the image and continues below. For an example go here:
http://tomasio.at/temp/test_valign.html

I want to achieve the following look:
http://tomasio.at/temp/correct.html


<title>CSS Tutorial</title>?

Doing this "properly" requires browser support for CSS tables (not
supported by IE): http://homepage.ntlworld.ie/spartanicus/temp.htm


thx a lot, Spartacus. It's a shame that IE does not render CSS tables,
but at least it displays correctly in Firefox.

kind regards,
--
tomasio
Feb 27 '06 #6
On Mon, 27 Feb 2006 18:08:29 +0200, Sid Ismail <el***@nospam.c o.za>
wrote:
If it were me, I would use tables. Of course I use CSS as well, but
for this application, what could be simpler?

<table cellpadding=6>
<tr>
<td>the image</td>
<td valign=bottom>t he text</td>
</tr>
</table>

Set width of TDs and Table to taste. Serves a good page.

Sid


In this case it is the most simple approach. Sometimes these tables
are still useful ; )

Thank you for your help.

kind regards,
--
tomasio
Feb 27 '06 #7

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

Similar topics

1
3839
by: junior | last post by:
Hi group, I have a problem with a small project i'm doing at the moment. Here's my code below. <table width="668" height="63" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="63" align="right" valign="middle" background="/xxxxx/xxx/plain.gif" style="height:63px; width:668px;
1
2429
by: Graham Cross | last post by:
Dear All Is there an HTML way of aligning the images on this page http://www.ageconcernleics.com/review03/chairs03.html so that they appear evenly spaced relative to the text column on the left. In a perfect world I would like the top of the first photo to be aligned with the first line of text. Thanks
1
610
by: Larry Viezel | last post by:
http://nominex.com/bottomalign.htm I am viewing this page in IE. The expected behavior is that the image will align to the bottom of the div and that the text will wrap around the image. But alas the image is in a layer over the text. Am I doing something wrong? Is there a way to get the text to wrap? Also, is there a min-height hack for IE that I can get this to work in conjunction with? So that I can set the minimum height of the div...
10
8503
by: Carolyn Marenger | last post by:
I think this is an easy one, but I have not been able to find it anywhere. In HTML, I used <center><img src="whatever.gif></center> to horizontally center a graphic on a page. What is the CSS way of doing the same? Thanks, Carolyn ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms -...
0
1390
by: Paul E Collins | last post by:
Hello. I want to display a number of individual blocks of text. Each block has an associated image, which should be displayed on the right and aligned with the top of its block of text, i.e. (use a fixed-width font to view this!) Some short text. +-------+ | | +-------+
7
1661
by: lilOlMe | last post by:
I'm designing a sort of error message screen. Well it's not a screen...its just a <div> that displays the error messages and allows the user to close it (or drag it around etc.) The title essential has two components: - a link that contains a small image followed by the text "Error" - a button that "closes" the screen My problem is that when I changed the button into a button (as apposed to the link that I had it before) the text...
2
2443
by: agbee1 | last post by:
Hello: I've finally made the effort to ween myself from overly using tables and use CSS for my positioning. However, I am having a problem with my navigational menu properly aligning in Firefox, despite the fact that I have gotten a green light from W3. link to problem page: I didn't see a feature to attach my css code so I pasted sections of the code that dealt with layout and navigation below. Thanking you in advance,
14
2418
by: gaijinco | last post by:
I was a hobbist web coder for years but I had to sidestep for a while. Now I'm trying to return to it and I'm trying to clarify how am I supposed to do somethings with CSS v.s. HTML and I'm specially having difficulties with center alignment of elements like images and tables. How is the "right" way to do it? (books that I have checked seemed to dodge the issue) I also have a doubt. html-atributes width and height are preferred over...
10
2188
unstoppablekatia
by: unstoppablekatia | last post by:
I have a website that has images on it, and underneath the images are text. My only option of aligning the images and text separate from each other, is to do <div align="right">, <center>, or <div align="left">. Neither of them help with what I want to do, and nor does <display:inline> or <float:right>, even adding them to the image links does no good. My Question: I would like the images to be right next to each other on the page, with the...
0
8402
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
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...
1
8508
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8608
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
5633
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
4164
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
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
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

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.