I found a bug in the vertical align action, when used together with horizontal page centering:
It tries to remove the “height” parameter from the pageDiv tag to work with Safari. But the pageDiv tag in my FW 5 output has only a “min-height” parameter. That leaves to an invalid “min-” parameter.
I simply commented out the following line in the action:
// pageDiv.style = RemoveStyleParameter(pageDiv.style,“height”); // Height stuffs up Safari (applied if page horizontally aligned as well)…
Now it works together with center page aligning. The min-height parameter doesn’t seem to stuff up Safari.
There is still an issue with layered item. To do proper vertical aligning it needs at least one non layered item at the bottom of the layout. What it does is to place a table within the PageDiv tag thus preventing the height of the PageDiv to collapse.
To work on layered items without the help of this non-layered item, the min-height parameter of the PageDiv tag has to be replaced with the height parameter set to the absolute height of the PageDiv.
To calculate the height of the PageDiv currently I only can iterate through all div tags enclosed by the PageDiv to look for the top and height parameters. If anyone knows an easier way to calculate the height, please drop a line.
I found a bug in the vertical align action, when used together with
horizontal page centering:
It tries to remove the “height” parameter from the pageDiv tag to
work with Safari. But the pageDiv tag in my FW 5 output has only a
“min-height” parameter. That leaves to an invalid “min-” parameter.
I simply commented out the following line in the action:
// pageDiv.style = RemoveStyleParameter(pageDiv.style,“height”); //
Height stuffs up Safari (applied if page horizontally aligned as
well)…
Now it works together with center page aligning. The min-height
parameter doesn’t seem to stuff up Safari.
There is still an issue with layered item. To do proper vertical
aligning it needs at least one non layered item at the bottom of the
layout. What it does is to place a table within the PageDiv tag thus
preventing the height of the PageDiv to collapse.
To work on layered items without the help of this non-layered item,
the min-height parameter of the PageDiv tag has to be replaced with
the height parameter set to the absolute height of the PageDiv.
To calculate the height of the PageDiv currently I only can iterate
through all div tags enclosed by the PageDiv to look for the top and
height parameters. If anyone knows an easier way to calculate the
height, please drop a line.
I have just done a small update to a site last fiddled with in FW4 and couldn’t understand why some of my Vertically Aligned pages were giving me grief. Until I found this thread of course and Peter’s version has done the trick for me.
But be careful as the last line
<page-action>
should read
</ page-action>
But with no space between the ‘/’ and ‘page-action’
One small caveat to using this is it breaks the page body tags and therefore if you try to use ‘css menus’ on a vertically centred page the app errors with the following message:
Thanks for pointing out the missing slash. The formatter had eaten it up unfortunately.
@mmull:
I’d bet, the error appears also in the original vertical-align action. Right?
You can send me a to a single page stripped down Freeway document, where the error occurs, and I can have a look, when I have time. But no promise that I can fix it.
All I did was comment the offending line and everything works now, must try and find out what the previous code did to the body tag to screw everything up though.
Hi everyone
me again and as usual I know my question will sound a bit dim but here goes anyway. If I just want to add an extra style attribute to the page div is there a simple way to do it.
I understand (and have successfully with a lot of help) added things using my actions within the HTML tags but I have never tackled adding extra style attributes. I have looked at the
function GetCSSAttribute(tag, fieldName, attributeName)
within the manual and “my goodness” this looks like an enormous amount of code just to add 1 attribute, is this the only way?
If someone could point out, what I need to use so I can add some extra style attributes or if there was a simple alternative then that would very handy
Yes. THe issue is that internally, Freeway stores the styles applied
to an element as a single string, rather than an object or some other
key:value data structure. I have rewritten the get and set CSS
functions slightly, my versions follow in a Gist.
Walter
On Oct 24, 2010, at 4:20 PM, pems wrote:
Hi everyone
me again and as usual I know my question will sound a bit dim but
here goes anyway. If I just want to add an extra style attribute to
the page div is there a simple way to do it.
I understand (and have successfully with a lot of help) added things
using my actions within the HTML tags but I have never tackled
adding extra style attributes. I have looked at the
function GetCSSAttribute(tag, fieldName, attributeName)
within the manual and “my goodness” this looks like an enormous
amount of code just to add 1 attribute, is this the only way?
If someone could point out, what I need to use so I can add some
extra style attributes or if there was a simple alternative then
that would very handy