Hi JP,
The vertical-align CSS attribute is a confusing one. At first glance
it seems it will do the trick but delve more deeply and you will see
that it has been designed to replicate table behavior and as such can
only be used on a table that contains divs posing as table rows and
cells.
The code for this would be:
<table>
<div style="display:table-row">
<div id="item1" style="width:300px; height:300px; border:solid
#000 1px; display:table-cell; vertical-align:middle;">
Nunc auctor bibendum eros. Maecenas porta accumsan mauris.
Etiam enim enim, elementum sed, bibendum quis, rhoncus non, metus.
Fusce neque dolor, adipiscing sed, consectetuer et, lacinia sit amet,
quam.
Not ideal as you can see, you’d need to place a whole load of other
tags around your layer item, then remove a load of Freeway generated
styling just to get it to work. The only other time you can use
vertical-align is on inline elements. So for instance, if you had an
image in the run of text, you can set this to be aligned against the
run of the text (not the item the text is inside). I don’t think that
this is a fault of Freeway here though, more a fault of the CSS
specifications being unclear and confusing, and also not having a one
line, easy solution to the problem.
The way that I tend to center text in a layer item is by using top and
bottom padding. This depends on how large you want the item and the
padding to be but for example:
Select your item containing the text you want centered and set the
top and bottom padding (using the custom option in the dropdown in
the Inspector) to something like 50px. Then give the item an undefined
height by clicking the height icon in the Inspector. Now the text in
the item will always remain 50px from the top and bottom of the item.
Not quite the same as completely centered I know but close!
A quick search for centering text/divs vertically on Google will show
you just how much pain this problem causes people.
I hope this helps.
Joe
On 31 Mar 2009, at 09:53, John-Paul Kernot wrote:
Pete:
Unfortunately that only horizontally centers and does not vertically
center.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options