ActionsDev
17 replies to this thread. Most Recent
riccc123
3 Apr 2009, 4:26 pm
[Pro] Vertical Align with CSS?
Hello,
I tried using this action to center my page in the browser, but I get a message that an “ACTION HAS JavaScript ERROR…” with a list of my CSS Menu items.
http://actionsforge.com/actions/view/40-vertical-align-action
Right now the top of my page is glued to the top of the Browser. Either I’m not using this Action correctly, or it’s not available with the combination of elements on my page. Will it work if the page has a CSS Menu? I applied Page Actions>Vertical Align to my page and selected “Center”.
Am I doing something wrong, or is there a way to make this action work, or is there another alternative?
The site is up for testing here: http://homepage.mac.com/riccohn/
I tried asking in the Freeway Talk Forum, but I didn’t get a reply. I hope the Actions Forum is a better place for this question. Any help will be appreciated!
Richard
mmull
9 Apr 2009, 10:53 pmriccc123,
Bad news I’m afraid - I had the same problem with a site I have just finished. Tech support at Softpress have basically told me that because they fudge the code when outputting css menu’s and the vertical alignment also needs to alter the same code they conflict in the final code output.
I left a message on the VA thread but it hasn’t been altered or afaik answered since (I admit I haven’t checked in a while though). I got around the issue by creating a graphic menu for my site but I am about to crash head long into the same problem on my next site. tch tch
If you want to see how my page ended up take a look at:
Also, any feedback on the site itself would be greatly recieved too.
Regards,
mmuller
mmull
9 Apr 2009, 10:56 pmriccc123,
here’s the link to the other thread too:
http://www.freewaytalk.net/thread/view/39447
Maybe if someone else was posting there some clever folk might find an answer…
mmull
9 Apr 2009, 11:52 pmWell, its seems that the fix is incredibly easy… but requires some more testing.
http://mmuller.vndv.com/CSS%20Navigation.fwactionb.zip
Download the above its an altered version of the css navigation action. All I did was comment out the offending line that gave the error on the body tag and so far so good - everything seems fine both actions now play nicely together.
As I say though it might need a proper look at why that part is causing the issue in the original but hey happy days for now…
You will need to overwrite the original action with the one above, its location can be found here:
/Applications/Freeway 5 Pro.app/Contents/SharedSupport/Actions/FAST/
Right Click show package contents on Freeway 5 Pro.
Regards,
mmuller
riccc123
10 Apr 2009, 2:35 pmWow, that was a flood of activity after a dry spell. I’m glad my problem was confirmed. I did hear back from tech support saying the problem was there and would be difficult to fix, but it looks like mmuller has gotten to it right away!
My knowledge of Freeway is pretty basic, and I’m hesitant to do something that might have unforeseen consequences that I’ll find hard to trouble shoot and get back to where I am now. Is there any danger of messing up my site that can’t be fixed by returning the old action if I try replacing the old action with this action?
Thanks for the help!
Richard
http://www.rcretouching.com/ Comments welcome!
mmull
11 Apr 2009, 8:11 amWell, i guess the obvious is to create a backup of your site, then create a backup of the original css menu. After that substitute the css menu and continue working on the backup, if anything should go cranky, return to the backup and the original css menu. Or if you cant be bothered with moving files around - do as I have done and just comment/uncomment that single line in the css menu action.
I will report back later this week as I will be beginning in earnest on the next site that will make heavy use of both actions.
:)
riccc123
13 Apr 2009, 5:24 pmOn 11 Apr 2009, 8:11 am, mmull wrote:
Well, i guess the obvious is to create a backup of your site, then create a backup of the original css menu. After that substitute the css menu and continue working on the backup, if anything should go cranky, return to the backup and the original css menu. Or if you cant be bothered with moving files around - do as I have done and just comment/uncomment that single line in the css menu action.
Makes sense, however, I don’t know enough to feel comfortable inserting comment/uncomments inline and I do worry about unintentional consequences on various browsers if I substitute your new action before it’s been tried “in the field” by you and others. I do have enough knowledge to follow your advice after it’s been tested a little further. Please keep us informed when you try it on the new site you are working on! If it seems to work OK I’ll try it and report back.
Thanks!!!
Richard
Joe Billings
13 Apr 2009, 8:12 pmCommenting that line will prevent the Action from working on IE6. If you aren’t concerned about that then go ahead, otherwise, the problem is with the vertical align Action.
Hope this helps.
Joe
On 13 Apr 2009, at 18:24, riccc123 wrote:
On 11 Apr 2009, 8:11 am, mmull wrote:
Well, i guess the obvious is to create a backup of your site, then create a backup of the original css menu. After that substitute the css menu and continue working on the backup, if anything should go cranky, return to the backup and the original css menu. Or if you cant be bothered with moving files around - do as I have done and just comment/uncomment that single line in the css menu action.
Makes sense, however, I don’t know enough to feel comfortable inserting comment/uncomments inline and I do worry about unintentional consequences on various browsers if I substitute your new action before it’s been tried “in the field” by you and others. I do have enough knowledge to follow your advice after it’s been tested a little further. Please keep us informed when you try it on the new site you are working on! If it seems to work OK I’ll try it and report back.
Thanks!!!
Richard
mmull
13 Apr 2009, 9:36 pmJoe,
How on earth would one go about finding the offending command in the vertical align action as it doesn’t show any errors - only the conflict with the css menu shows up ?
regards,
mmull
riccc123
13 Apr 2009, 11:49 pmOn 13 Apr 2009, 8:12 pm, Joe Billings wrote:
Commenting that line will prevent the Action from working on IE6. If you aren’t concerned about that then go ahead, otherwise, the problem is with the vertical align Action.
Hope this helps.
Joe
Thanks. I just looked at my older site’s Google Analytics. A small, but not insignificant, percentage of users still appear to use IE6. Go figure.
Richard
Joe Billings
14 Apr 2009, 9:50 amI’ll take a look and let you know.
Joe
On 13 Apr 2009, at 22:36, mmull wrote:
Joe,
How on earth would one go about finding the offending command in the vertical align action as it doesn’t show any errors - only the conflict with the css menu shows up ?
regards,
mmull
mmull
10 Jun 2009, 10:50 pmJoe,
Any chance of taking a look at the offending code - its been a couple of months since the last post and a resolution would be great for all FW users :)
Regards,
mmull
Joe Billings
11 Jun 2009, 8:50 amSorry, this completely slipped from my radar. It is actually a line in the CSS Menus, change this (it’s the line above the error):
var bodyTag = bodyHTML.match(/<body[\s\w\d()-="']*>/gi);//'"
to this:
var bodyTag = bodyHTML.match(/<body[\s\w\d()-=%"']*>/gi);//'"
The regular expression in the original isn’t looking for a percentage value in the body tag, it is in the second expression.
I hope this helps.
Joe
On 10 Jun 2009, at 23:50, mmull wrote:
Joe,
Any chance of taking a look at the offending code - its been a couple of months since the last post and a resolution would be great for all FW users :)
Regards,
mmull
mmull
12 Jun 2009, 9:17 pmFantastic Joe,
I will test this out tonight to see if it all works nicely now :)
Regards,
mmull
riccc123
28 Jul 2009, 6:56 pmI was hoping this would be fixed in 5.4 and was happy to see a new “Vertical Alignment” action. However, just applying this to the page allows it float Vertically— but locks it to the left side of my browser. Anyone know how to get it to float BOTH vertically and horizontally? Maybe this action still doesn’t work with CSS? Or maybe the solution is obvious to you much more knowledgeable people!?
Thanks for any help.
Richard
Joe Billings
29 Jul 2009, 1:22 pmFor anyone that’s interested, we’ve just put an updated version of the Vertical Align Action on ActionsForge:
http://actionsforge.com/actions/view/40-vertical-align-action
Joe
On 28 Jul 2009, at 19:55, riccc123 wrote:
I was hoping this would be fixed in 5.4 and was happy to see a new “Vertical Alignment” action. However, just applying this to the page allows it float Vertically— but locks it to the left side of my browser. Anyone know how to get it to float BOTH vertically and horizontally? Maybe this action still doesn’t work with CSS? Or maybe the solution is obvious to you much more knowledgeable people!?
Thanks for any help.
Richard
riccc123
29 Jul 2009, 3:44 pmI just tried the new action and I’m pleased to report that it works for me!
Note that, as the instructions say, all your items need to be either Layers or Table based. I went through my entire site to make sure that “Layers” was turned on for every item (and had to fix a few things that moved or broke when layers was switched on), then this new action worked perfectly.
Richard
Will Vincent
18 Oct 2010, 8:07 pmHi Thomas,
Thank you for your reply and sorry for my late one, been a busy month!
Your example you posted is indeed how i’d like to look.
Within the 2nd query
( http://www.iamwillvincent.co.uk/centeringsite.jpg )
The alignment on all pages on the site is set to center, and i just downloaded the action you mentioned and applied it to the page in top centre and bottom modes, but it didn’t make any difference in either.
The menu items need to be set to fixed in window so that they appear at all times whilst the user can scroll up and down to see the main page content. Setting them to absolute means they go off screen when the user scrolls down to see more work.
Unfortunately your solution to the first problem doesn’t seem applicable to it, I think you might not’ve quite understood it, thank you for your time though.
Any other takers on this problem? Really want to get this sorted!
Will.
