473,417 Members | 1,623 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,417 software developers and data experts.

vertical-align: center

If I want to have the middle of an image vertically aligned with the
middle of a heading (or several lines of heading), is there some
particular way people would recommend? vertical-align: center looked
made for that. The effect I want is

img heading
img heading
img heading
or
heading
img heading
img heading
heading
or
img
img heading
img heading
img

I want a liquid layout, and I won't know in advance the relative size of
the image or the heading (which will be different for every page). Plus
the heading is likely to be long in some cases, and flow into several
lines if the viewpoint is narrow.

You guys are about to tell me that vertical-align: center will not work
in a certain much used web browser that Macintosh users don't have,
aren't you?

--
http://www.ericlindsay.com
Dec 3 '05 #1
2 12115
in comp.infosystems.www.authoring.stylesheets, Eric Lindsay wrote:
If I want to have the middle of an image vertically aligned with the
middle of a heading (or several lines of heading), is there some
particular way people would recommend? vertical-align: center looked
made for that. The effect I want is I want a liquid layout, and I won't know in advance the relative size of
the image or the heading (which will be different for every page). Plus
the heading is likely to be long in some cases, and flow into several
lines if the viewpoint is narrow. You guys are about to tell me that vertical-align: center will not work
in a certain much used web browser that Macintosh users don't have,
aren't you?

Yes, and should not work on any much used Mac browser either. Use
vertical-align:middle

Vertical-align:middle is not exactly made for this, as you want to do
multiline vertical align, as it is only for vertical align inside linebox
usually.

Some ways to do vertical centering:
http://www.student.oulu.fi/~laurirai/www/css/middle/

Choose some that fit your purpose...

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Dec 3 '05 #2
In article <MP************************@news.individual.net> ,
Lauri Raittila <la***@raittila.cjb.net> wrote:
in comp.infosystems.www.authoring.stylesheets, Eric Lindsay wrote:
If I want to have the middle of an image vertically aligned with the
middle of a heading (or several lines of heading), is there some
particular way people would recommend? vertical-align: center looked
made for that.
Yes, and should not work on any much used Mac browser either. Use
vertical-align:middle
Opps, thanks for that. I guess I was looking at text-align as well and
didn't recall the correct item for vertical-align.
Vertical-align:middle is not exactly made for this, as you want to do
multiline vertical align, as it is only for vertical align inside linebox
usually.
So if I can actually keep the heading confined to one line, I am in a
much better position. I normally do manage to confine headings to a
single line, but I rather suspect the people wanting things changed will
want lots of lines of text.
Some ways to do vertical centering:
http://www.student.oulu.fi/~laurirai/www/css/middle/

Choose some that fit your purpose...


After posting I had actually found that wonderful resource that you have
provided. It has provided some great ways of doing other center layouts.
Thank you very much for it.

However I couldn't figure how to precisely match the many ideas on your
page to what I wanted to do once I had eliminated using pixel
measurements and tables. I can do it with a table, but I really don't
want to get pushed into using a table for layout until I have nowhere
else to turn. If I could be sure of having a single line of header it
would be great. The line-height idea looks very handy if text doesn't
wrap. Plus some of the really nice ideas don't work with IE. Very
handy page. I will have a good play with your ideas and see what
happens. Thanks.

Of course, maybe I can talk them out of the idea that they want several
lines of heading. Maybe I can convince them that having the top of the
image and the top of the heading aligned would look more like the rest
of the page.

--
http://www.ericlindsay.com
Dec 3 '05 #3

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

Similar topics

10
by: John Baker | last post by:
Hi: I have a user who has labels that are set up 3 across and 11 vertical (which is unusual at best), and he wants me to print names and addresses on them. I have already set up for labels 10...
0
by: GiladP1 | last post by:
Hi, I am trying to create a vertical label or a vertical text box by useing their 'Vertical' property. But the text just disapears. I can manage to get right-to-left text to be vertical but...
1
by: James Dean | last post by:
Can you make vertical text in a richtextbox or is there any way around this like make the string vertical outside the textbox then try to paste it in that way into the textbox?.... *** Sent...
7
by: bienwell | last post by:
Hi, I'm using the CheckBoxList control in ASP.NET for Web development. This checkboxlist is bound by the database. If we have more items for this checkbox list, it takes space on the page. I...
0
by: DraguVaso | last post by:
Hi, I'm having a DataGrid on which I want to draw 2 moveable vertical lines. What should happen is: When I move a vertical line, I have somewhere an indication on which character in the datagrid...
5
by: Rico | last post by:
I have label that I need to be vertical. The problem is that when I select "Vertical=yes" the label reads from top to bottom rather than bottom to top (which i need). Can this be done? Any...
3
by: Avi G | last post by:
Hi, i work with VS 2005 and i need to know how to put the windows time(Clock) on my label that it is on the form that i will see the full time include the second as they move, and i need to know...
2
by: akm | last post by:
I am facing an issue with the vertical scroll bar. Actually i am using data grid to display the data in my tables, and also i am using the same view form to diplay the data for different tables....
3
by: Spiros Bousbouras | last post by:
The fact that vertical tab and form feed exist both in the basic source character set and the basic execution character set suggests to me that there is a class of display devices where vertical...
1
by: Tom | last post by:
First, I posted a similar request for help in another group and now don't find the posting. Problem with my newsreader perhaps ... but apologies if this appears as a cross posting. My code is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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:
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
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,...
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.