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 6723637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:35:34+00:00 2026-05-26T09:35:34+00:00

I have two elements that I am trying to line up, a text box

  • 0

I have two elements that I am trying to line up, a text box and a span. In order for them to line up and look nice in firefox I use:

<input id="myTextBox" style="float: left; margin-right: 5px; position: relative; left: 13.5em; bottom: 1.5em;" type="text" />
<span style="visibility: visible; position: relative; left: 12.5em; bottom: 1.5em;">Enter stuff in the box </span>

However in IE 8 the text box is on top of the span, cutting off the text. If I change the left: 13.5em; to left: 11.8em; it lines up nice in Internet Explorer, but then is off center in Firefox. I am using decorators in a Zend Form so I have to use the inline styles. Is there any way to make the position line up in both browsers?

  • 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-26T09:35:34+00:00Added an answer on May 26, 2026 at 9:35 am

    As your <input> is floating, it might make more sense to use margin-left:10% instead of position:relative and left:10%? Similarly for your span, I would make it display:block;margin-left:10%;clear:left; rather than position:relative;.

    I’ve used 10% because using em for layout has given me cross-browser issues in the past – I only use it for text-based things now.

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

Sidebar

Related Questions

I have two span elements that I would like to stay on the same
So I have two nodes of elements that I'm essentially trying to join. I
I have two div elements that are twins (i.e. their dimensions and contents are
I have two STL containers that I want to merge, removing any elements that
We have two lists: a=['1','2','3','4'] b=['2','3','4','5'] How to get a list with elements that
We have a page that ordinarily has two elements arranged side-by-side. Despite exploring a
I want to be able to have two Haml elements on the same line.
I have an XmlReader that is trying to read text into a list of
I'm trying to display two <div> elements on the same line, but in the
I have two xml documents with about 1000 elements in each of them 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.