Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7032501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:56:37+00:00 2026-05-28T00:56:37+00:00

I have a page with a header, followed by a (menu/tool) bar underneath, which

  • 0

I have a page with a header, followed by a (menu/tool) bar underneath, which is supposed to carry two elements: a text to the left (big font) and a login link (smaller text). The right hand link is supposed the be centered vertically.

The following resource seemed to be exactly what I need:

http://www.css4you.de/Texteigenschaften/vertical-align.html

and

http://www.css4you.de/example/vertical-align.html

Here’s my HTML:

<div style="border: 1px solid purple;">
  <h1 style="border: 1px solid red; display: inline;">Textext</h1>
  <span id="logindisplay" style="border: 1px solid lime; float: right; vertical-align: middle;"><a href="/admin/login.xhtml">Log In</a></span>
</div>

The CSS ID selector for logindisplay doesn’t exist. h1 is just

h1
{
  font-size: 18pt;
}

I basically did everything as in the resource above, but it doesn’t work – neither on IE9 nor on FF. Here’s what I get:

Browser appearance

Does anybody know what I’m doing wrong?

Note: Workarounds/hacks aren’t desired. (One would be to set padding-top: on the span…)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:56:38+00:00Added an answer on May 28, 2026 at 12:56 am

    Using float:right negates the vertical-align as you found. Mark’s suggestion doesn’t work with position:relative on the div? In which case, line-height seems like the easiest way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a master page with Header, Menu, Content and Footer panes in my
Imagine I have a navigation bar in my page header, with a number of
I have multiple menues on my page... <div class=menu> <div>Menu header</div> <div>Menu content</div>// should
i have web page it has a page header content like main menu,logo and
I have a formula @InitVars in the page header which includes the following, and
I have page which encoding is declared with <meta http-equiv=Content-Type content=text/html; charset=UTF-8 /> But
I have standard page layout: header + 2 blocks (left and right). Code are
Out of the box SSRS reports cannot have data exposed in the page header.
In the header of my page I have a conditional statement to check if
Lets say that I have a header user control in a master page, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.