SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Nov 2008
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form Needs Vertical Centering

    On this page, the "Email Updates" image and email sign up form on the far right on top of the navigation bar both need vertically centering within that cell. I tried vertical-align: middle; but it won't work. And putting margins on the image to "push down" both only ends up increasing the height of that entire row. Help?

  2. #2
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    You will need to remove the float from the right td to get it to honor any vertical-alignment.

    You will need to set vertical-align on the left td also to sync them together.

    Code:
    td.headerbottom1  {
    vertical-align:middle;
    }
    td.headerbottom2 {
    /*float:right;*/
    vertical-align:middle;
    }
    Actually v-align:middle is the default so just removing the float should accomplish the same thing.
    Then you could set text-align:right on td.headerbottom2 with a margin on that image

  3. #3
    SitePoint Addict
    Join Date
    Nov 2008
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! I think that did it.

    Does placing those slashes before and after the line of code (on float) sort of temporarily void that code (until you remove the slashes?)?

  4. #4
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Yes, those are "CSS Comments". When they are set up like I have shown it will disable the rule. They are also used to explain something (comment) without interfering with the ruleset.

  5. #5
    SitePoint Addict
    Join Date
    Nov 2008
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mm. Got it. Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •