PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Center single dropdown within a form

  1. jme5674
    Member

    i want to center just one dropdown within a form. using firebug, i can "Edit Element Style..." using "text-align:center" to get the one dropdown to center without centering all of the form's elements. but i cannot determine the path to add it to my stylesheet. i even copied the path by using firebug's "Copy CSS Path" and that didn't work.

    here is the form in question:
    http://http://www.justdanceinc.biz/birthday-parties

    at the bottom of the page is the dropdown that needs centered. once that dropdown is populated, the rest of form is present. the first dropdown is the only one to be centered.

    Thanks to anyone that can help me out!!

    Posted 12 years ago on Saturday March 3, 2012 | Permalink
  2. I see right now you have this in your style.css file:

    [css]
    #content li.dropdown_center {
    display: none;
    }

    This worked for me:

    [css]
    #content li.dropdown_center {
    text-align: center;
    }
    Posted 12 years ago on Saturday March 3, 2012 | Permalink
  3. jme5674
    Member

    hi. thank you for the response! yes, i added that just to test to see if i was getting the right path. i was just testing late last night and never deleted that from my style sheet. as you can see, if that was the correct path, that dropdown would not be displayed, but it still is. i've already tried the suggestion that you put, but it isn't working for me!

    i just added that back into my stylesheet and it's still not working! here is a .jpg of a printscreen of my stylesheet with the style in question:

    http://www.justdanceinc.biz/wp-content/uploads/dropdown-center.jpg

    I just don't understand why it's not working!! like i said in the OP, it centers when i edit the element with firebug, but not when i add what you suggested to my stylesheet! in fact, before i had it as "display:none;" i tried "text-align:center;". there must be something i'm doing wrong!

    thanks again for your help!

    Posted 12 years ago on Saturday March 3, 2012 | Permalink
  4. jme5674
    Member

    update...it still is not working when i add it to my stylesheet, but if i add:

    <style type="text/css">
    #content li.dropdown_center {
       text-align: center;
    }
    </style>

    to the top of the form's page, the dropdown is centered. although it works this way, i would like to just add it to my stylesheet, as i don't like to style pages within the page itself because if the owner happens to edit that page using the "visual" tab, all styles are lost!

    any ideas why it isn't working when added to the stylesheet?

    Posted 12 years ago on Saturday March 3, 2012 | Permalink
  5. jme5674
    Member

    this is really weird! you were correct (actually, i had it right last night, too!) but something must be wrong with my stylesheet!! i moved the entry:

    #content li.dropdown_center {
        text-align:center;
    }

    to the top of the stylesheet and it works! so would that mean that there is an error somewhere near the bottom of the stylesheet? is it possible for a stylesheet to be too long?? i just don't understand why it worked when i moved it to the top of the sheet, but not at the bottom!?!? any ideas??

    thanks again for your help!

    Posted 12 years ago on Saturday March 3, 2012 | Permalink
  6. jme5674
    Member

    well, i think i figured it out! i had no idea that an error like this would cause everything "underneath" it to not work within the stylesheet!! near the bottom of the stylesheet there was this entry:

    .which-session (
    	height:75px;
    }

    as you can see, the error was an open parentesis ( instead of {. so i guess this small error affects everything after in the stylesheet? i'm assuming this is the case, since it affected my sheet. is this the case?

    Posted 12 years ago on Saturday March 3, 2012 | Permalink
  7. Indeed, invalid CSS will break everything below it. Sometimes, its a needle in a haystack, but looks like you found it!

    Posted 12 years ago on Saturday March 3, 2012 | Permalink
  8. jme5674
    Member

    yes! and thank you, Rob! your quick responses and spot on solutions make me very happy that I purchased this fantastic plugin! I just love how every single element can be manipulated and styled!!! i used to use contact form 7 (which really is a fine plugin being that it's free), but gravity forms is, hands down, a far SUPERIOR product!!!! not only is it easy, but it just makes sense! everything works flawlessly! unless, of course, there's a user error! haha!

    thanks again!!

    Josh

    Posted 12 years ago on Saturday March 3, 2012 | Permalink
  9. Awesome Josh, glad you are diggin' Gravity Forms! Thanks for the kind words.

    Posted 12 years ago on Sunday March 4, 2012 | Permalink

This topic has been resolved and has been closed to new replies.