Marc Susan wrote:
Okay, I did my homework, but maybe that's already old hat...
Yes, I think we've moved on
BTW, I managed to open your links after adding the missing '.com' after 'marcsusan'...
Just to be clear, your centering issue is not an issue with the
form; - it's an issue with the
theme you are using. The form, when wrapped in a div, will behave and display like any other block element in terms of centering, padding, margins, etc.. (see e.g.:
http://www.w3schools.com/css/css_boxmodel.asp)
IMHO, the theme, with its multitude of code-altering javascripts, is way more complicated than it would need to be. I think the simple layout of the page (a header, a footer, a sidebar and a main content area) could have been accomplished in a much simpler, cleaner manner with more of straight HTML/CSS and less javascripting.
In the line "<div class="content p7ehc-1">", the second 'class' (p7ehc-1) is not a css class, but a reference to a javascript that turns that single div into the following two divs:
<div class="content p7ehc-1" style="padding-top: 0px; padding-bottom: 0px; height: 501px;">
<div id="p7EHCd_2" style="padding-top: 20px; padding-bottom: 20px;">
You can see the two 'new' divs high-lighted in the attached screenshot from Chrome's Firebug.
The modified/added divs still include the javascript reference, leading to further modifications as the viewport width is changed. For all I know the id="p7EHCd_2" may also be a reference to a javascript...
This is why, in my prior post, I preferred to bypass all that and suggested that you
simply replace this line:
<div class="content p7ehc-1">
with this one:
<div style="padding-top: 30px; padding-bottom: 0px; height: 559px; width: 99%; margin: 0px -13% 0px auto;">
This seems to work and the form looks nicely centered at all viewport widths.
You can play around with the parameters and alter the numerical values to your liking - if you so wish. The height in the original is continuously modified by the javascript, as the viewport is resized. I think you could remove the height declaration entirely, since the size of the form will determine the height of the div anyway.
The four margins are in the order: top right bottom left, separated by a space. The negative right margin moves the form over to the right by 13 % of the available width in the div. The 'auto' left margin ensures that the form is continuously centered at all viewport widths.
As I mentioned before, if this still does not work out for you, you will need to contact 'Project7' for instructions on how to add content in their complicated theme!
Best of luck and keep us posted on how it all works out!