[Typo3] Case / if statements in TMENU for ATagParams

JoH info at cybercraft.de
Wed Apr 13 23:55:05 CEST 2005


> the reason is, that I want to align the text in the middle .. but
> unfortunatly the vertical-align:middle; doesn't work as I want it ...

Well - as far as I can see, you don't need any PHP, split or optionSplit for
that, since it doesn't work for _all_ your links.
The single lined links accidentally look fine because you are using a value
for padding-top that makes them look like vertical-align:middle, but they
aren't aligned at all.

Conclusion: It's all about properly setup CSS if it's possible at all.

Solution: Well - there are 2

W3C states clearly what "vertical-align:middle" can be used for.

'middle'
align the vertical midpoint of the element (typically an image) with the
baseline plus half the x-height of the parent.

This will work in two cases only:
1. You define a line-height for the text that should be aligned
    but this won't work in your case, since you would have double lines and
thus double line heights afterwards.
2. You have a surrounding table-cell

So 2 is the only working solution for your scenario. Build a surrounding
table and put each item into a table cell with vertical-align:middle.

IMHO there's another and even better solution: Don't use a fixed height for
the menu items!
It looks much better having different item heights with a uniform
padding-top and padding-bottom and you don't waste valuable screen-space.
And as my old boss used to say: Don't use gradients - gradients are always
used when the designer had no better idea.
If you get rid of the background gradients you don't need fixed heights
anymore.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-english mailing list