You are here: Re: My Two Columns Revisited « HTML « IT news, forums, messages
Re: My Two Columns Revisited

Posted by Ben C on 03/18/07 20:49

On 2007-03-18, aljones <al@shotmail.com> wrote:
[...]
>> URL http://aljones.us/ab
>>
>> The H1 - Broken Chains Ministry - I'd like to have it centered between the
>> two hand images; but I can't see how to make that work. Oddly enough, that
>> the one thing that a the couple of people who have looked at this have
>> commented on ....
> BenC: your suggestion re the hands worked nicely, they are now the
> proper places and stay there (unless someone set the view port width too
> narrow then the header floats badly).
> However, I still can't manage to get the text H1 right, I now have it
> centered properly, but with 'vertical-alignment:middle;' it's still at
> the top of the banner.

You want it vertically centered in the region whose height is defined by
the two hand images?

That's harder. If the <h1>'s content is all on one line, and you know
the heights of the images, you can set the height on that line with
line-height to the height of the images, and it will work. But if the
<h1> spans two lines, which it might in a narrow viewport (unless you
prevent line breaking with white-space: nowrap or similar), a big line
height will be a problem.

The point is, the <h1>'s content is aligned to the middle of the line
it's on, and the height of that line is unrelated to the heights of the
floating images. By default it's something like 1.1x or 1.2x the font
size, which is why the <h1> still appears rather high up.

You will have to use a table. One row, each hand image in its own cell at
the ends, and the heading in a cell in the middle with vertical-align:
middle.

Or just give the <h1> a bit of a top margin-- after all you know the
heights of the images-- and settle for it not exactly centered.

[...]
> If I sound really disconnected in this message, it's because I am - I've
> had a couple of viri that I've been trying to get cleaned up and
> apparently one of them decided to have a go at t0h0s0 of my hard drive.

You cleaned up a couple of men and they repayed you by trashing your
hard drive? How ungrateful.

Viri is not the plural of virus. Its Latin plural if it had one would
probably be vira but it's never been spotted in a real Latin text. So
stick with "viruses".

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация