How Do I Center A Javascript Element?

  • Kyle


    Hey there!

    First let me say that I really love this theme. I also love the support in this forum. I started out hard coding websites in HTML. CSS has since come into play and some of the ways I did things had to be changed. For example, I found out through this forum that I should no longer use tables for laying out pages. I have since delved into learning CSS. That said, I am having trouble centering a javascript element. The element is hard left and I can’t make it move. I’ve tried auto margins and even the depreciated Center tag. No luck.

    Is there possibly an “inline” CSS command that will allow me to center this one element?

    Please see this problem at this link.

    You see, this is a generated form and it lines up hard left. I’d like to center this element so the edges of the envelope graphic are the same distance from the left margin as the right margin.

    Please excuse me if this has already been answered, I call myself searching the forum, but to no avail.

    Thanks again for all of your help.


    Kenneth John Odle


    Somewhere in your CSS, you have this:

    .form-all {
    background: url("") no-repeat scroll 0 0 / 390px 579px transparent;
    float: left;
    height: 578px;
    padding-left: 54px;
    padding-top: 0 !important;
    width: 340px;

    It’s the float:left that’s throwing you off.

    Add this to Custom CSS:

    .form-all {float:none;}

Viewing 2 posts - 1 through 2 (of 2 total)

  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!