[Pro] Centering a markup item (PayPal button)

Well, since I was initially mentioned in this post, I probably should weigh in.

There is a time, Doty, when the most helpful thing to do is just step back from the work a bit and try and get a fresh handle on what is going on.

You no doubt have a good grasp of how to center items in Freeway’s workspace… the problem you are faced with now is how to center the contents of a Markup item-- something which is much more conceptual and less direct.

Freeway generates your page code for you, and when you center an item in your Freeway workspace, it also generates the code for that. But a Markup item is a way for you to manually introduce page code that is not written or managed by Freeway… which means you are responsible for managing its style and appearance as well.

How an item is positioned depends on what that item is-- exactly. Because we are not dealing with Freeway but with page code. Also, as we learned in the other thread, if there are more than one of those buttons then how such items are centered “together” changes to reflect that reality. So, it’s not a one-size fits-all kind of answer, but a more nuanced solution that depends on understanding the page code.

Tim’s answer is simplest for the single button which is there, now.

Select the container item “paypal-button” in the Freeway workspace and open its Extended Style dialog. Under the <div style> tab create a new style definition:

NAME: text-align
VALUE: center

And that will do what you need. Alternatively, you can also create a new style in the Style Editor, name it

NAME: align-center

then use the paragraph styles to select centered alignment. Back in the workspace, apply the style to the container by selecting the “paypal-button” box then clicking the style name “align-center” from the Style Palette to apply it. That will also do what you need.

Why it works, exactly, I’m not sure… I mean, I know that it works through the CSS mechanism of Inheritance-- the text-align property is passed to the child contents of the container… what I don’t yet get is how text-align affects HTML elements like form and input. I had thought it was simply to affect the paragraph <p> element that Freeway inserts to wrap the stupid span element generated by the Markup Item process… but using the Inspect Element tool in Safari shows the browser sees that wrapping paragraph as malformed code, splitting it to before and after the form element inserted by the Markup Item. So, I don’t get it. Perhaps it is more the browser trying to accommodate unclear code than how it is supposed to work?

In any case, the result produced is what is wanted-- which I have learned to take as I can get. I’m not sure why you are having so much trouble with this, but Tim’s suggestion is about as straight-forward as it gets.

Best of luck.


freewaytalk mailing list
email@hidden
Update your subscriptions at: