473,698 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SELECT and INPUT tags don't line up horizontally in IE

I've noticed that with the following code, the SELECT and INPUT tags
don't line up horizontally in IE. Looks great in Mozilla (Firefox).

It seems that IE adds a 1 pixel margin top and bottom around the INPUT
tag. If I set the top and bottom margins to -1px it then messes up how
it looks in Mozilla.

I've also tried different DOCTYPES with marginal difference.

Any ideas anyone?

Thanks,
Steve
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style>
DIV {
border: 1px solid red;
}
..block {
display: inline;
float: left;
margin-right: 3px;
}
</style>
</head>
<body>
<div class="block">
Block #1<br>
<select style="width:10 0px"></select>
</div>
<div class="block">
Block #2<br>
<input style="width:10 0px">
</div>
</body>
</html>

Jul 21 '05 #1
2 3186
sn****@mxlogic. com wrote:
I've noticed that with the following code, the SELECT and INPUT tags
don't line up horizontally in IE. Looks great in Mozilla (Firefox).

It seems that IE adds a 1 pixel margin top and bottom around the INPUT
tag. If I set the top and bottom margins to -1px it then messes up how
it looks in Mozilla.


If by default there's no margin in Mozilla and you want to tell IE to do
likewise, wouldn't a margin of 0 be the solution rather than a margin of -1?
Jul 21 '05 #2
Thanks,

An interesting observation, but setting a margin of 0px in the INPUT
tag does not present a solution. I even tried changing the border to
1px solid #000000. This doesn't help either.

Steve

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
6548
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the courses to pass the correct option value and then be displayed at the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html I am passing countries, products, and courses. The first two display
4
11912
by: bengee | last post by:
Hi First off - by the word "anchor" i DON'T mean a link, i.e. <a></a> tags I'm trying to position a <select> box inside a <div>. I can use relative positioning to set where the box should appear using "left: ?px; top: ?px;". What i'd like to do though, is set the box so that it's dead horizontally center inside the <div> (don't forget that the width of the select box can change depending on what options i have listed in it).
0
5885
by: Lea | last post by:
Hi, I 've got a problem concerning the text alignment of my three input tags. In IE6, the "login" and "ok" words are completely aligned on the bottom border. Yet my padding is : 0px 0px 0px 1px; Changing the line-height does not improve anything. In FIREFOX 0.9.3, the text of the first input tag is fine. The asterisks of the input type password are too high in text field. And finally, the text of the third input tag is on the bottom...
1
3997
by: sneill | last post by:
The following code demontrates a curious problem in IE (works great in Mozilla). Why doesn't the INPUT box line up with the SELECT box in the context of DIV containers? Any ideas anyone? <html> <head>
15
15474
by: TJ Walls | last post by:
Hello All, Is it possible to create a <select> element with no selected options? I have tried setting the selectedIndex attribute to -1, but as far as I can tell this only works for <select multiple> elements. Am I missing something obvious? Sincerely, TJ Walls
4
7395
by: bobsawyer | last post by:
I've been building a series of SELECT lists that are populated dynamically using HTTPRequest. Things are going pretty well, and I've got the whole thing working flawlessly in Mozilla/Firebird. Unfortunately, Internet Explorer doesn't quite work as expected -- it gives me an "invalid argument" error that I don't know how to fix. Here's the entire script, with form, annotated to explain what I'm doing and where the problem is occurring. I...
9
2522
by: Udo Marx | last post by:
Greets to ciwah! I'm doing a little webproject for a local session event. Tryin' to meet latest standards i failed to do this: --snip-- <select name="fromcountry" accesskey="l" title="+"> <option value="dummy">dummy</option> </select> --snap-- W3C validator says: there is no attribute 'accesskey'
16
2743
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on screen appearance of the Select List grows for the first 5 rows then the scroll bar appears if there's more). So far so good. . . The problem is that none of the rows I'm inserting appear on the screen until I have RETURNed from my function; so If...
16
3567
by: Stan The Man | last post by:
I'm a CSS novice trying unsuccessfully to make three thumbnail images display horizontally instead of vertically. I suspect I'm missing something really stupid but I'll take the flak if someone could kindly point me in the right direction (using words that the vicar's wife would understand). The vertical thumbnails can be seen at the bottom of this page: http://www.zen86793.zen.co.uk/gmga2008/index.html ... the first image is in the right...
0
8680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9030
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8871
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.