473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Why elements are over my input fields when float them right in Firefox

Hi guys,

this is my code:
Expand|Select|Wrap|Line Numbers
  1.     <body>
  2.         <div id="main">
  3.             <span>Please enter your name and password below</span>
  4.                 <form id="form_no1">
  5.                 <span class="txt">ID:</span>
  6.                 <input type="text" name="login" class="field"/>
  7.                 <span class="txt">Password:</span>
  8.                 <input type="password" name="pass" class="field"/>
  9.                 <input type="submit" value="submit"/>
  10.             </form>
  11.         </div>
  12.     </body>
  13.  
Expand|Select|Wrap|Line Numbers
  1. *{margin:0; padding:0;}
  2. body {background-color: gray; text-align:center;}
  3.  
  4. form
  5. {display:block; width:144px; height:150px; margin:33px auto; }
  6.  
  7. .field{
  8. background-color:black; color:white; border: solid 1px silver;
  9. display:block; height:20px; width:144px; margin:0px 3px 12px 3px;padding:1px 1px; 
  10. ;}
  11.  
  12. span.txt
  13. {right:0; color: white; font-size: 11pt; display:block; float:right;}
  14.  
So in Firefox the
Expand|Select|Wrap|Line Numbers
  1. <span class="txt">ID:</span>
element goes over the first input field when float it right! Any suggestions how not to overlap?
Oct 1 '10 #1
2 2251
serdar
88
Add

clear:left

into field class.
Oct 5 '10 #2
kidwon
4
Thank you Serdar appreciate your help, it worked just fine :)
Oct 8 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: toylet | last post by:
Unlike Mozilla, when float:right an item in IE6, it's sort of appending a <br> after the float. You can see the difference here: http://toylet.homeip.net/~toylet Is there a way to stop IE6...
10
by: Jesper Rønn-Jensen | last post by:
Hope you can help me out on this one. I have a a box that is floated right. Below (in the normal float) I have a wide table. <body> <div style="float:right; width:200px">...</div> <p>This...
3
by: Michael Shell | last post by:
Greetings, I've been playing with CSS inline floats of <span> elements and the results are not quite what I would expect. In the example attached at the end of this post, I would expect the...
1
by: Peter Kirk | last post by:
Hi there I have a form which submits a list of data to a web-application (which then saves to a database). The list consists of four input fields per row. Eg....
4
by: SimonV | last post by:
Hmm, I let the user add more input fields as needed. But I have a strange problem with ff (and other mozillas) When I add a field in ff, the others lost their content... In IE the content stays...
22
by: ashkaan57 | last post by:
Hi, I am trying to put text on left and right side of the page and used: <div> <span>blah blah</span> <span style="float:right">blah blah</span> </div> The 2nd text does go to the right but the...
1
by: Sebarry | last post by:
Hi, I use the following code to create a couple of input fields at run-time. It works fine in Firefox but it doesn't do anything in Internet Explorer and no errors are given. The DOM created...
5
by: mwpclark | last post by:
I have javascript code which passes select input form field values in Firefox and Opera but it does not seem to work in IE7. This form runs a search, and the search results page has the same form...
0
by: clumsy_ninja | last post by:
I'm trying to create a tableless layout for a form. The following markup works as intended in Firefox and Opera, but one of IE 7's bugs ends up misplacing the floated input fields side-by-side even...
2
by: paragpdoke | last post by:
Hello All. I have a weird observation regarding the CSS float style for span. Allow me to share details before asking my question: Screen resolution: 1024x768 (I know my monitor is outdated; it...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.