473,324 Members | 2,456 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,324 software developers and data experts.

IE, Absolute Positioning and a Drop-Down Box

Hello,

Suppose we have this code:
[HTML]
<html>
<head>
<title>Test</title>
<style>
.autoSug {
position: absolute;
background-color: #FFFFFF;
border: 1px #000000 solid;
width: 200px;
}
</style>
</head>
<body bgcolor="#EEEEEE">
<input type="text" style="width: 200px;" /><br />
<div class="autoSug">Dummy<br />Dummy<br />Dummy</div><br />
<select>
<option>Test 1</option>
<option>Test 2</option>
<option>Test 3</option>
</select>
</body>
</html>
[/HTML]

In Firefox, Opera, Konqueror, etc. The DIV nicely overlaps the Drop-Down Box, but in IE the Drop-Down Box overlaps the DIV. I've encountered this problem multiple times and it is driving me crazy. Could anyone tell me how to solve this?
Jun 6 '07 #1
6 2718
drhowarddrfine
7,435 Expert 4TB
If you don't have a proper doctype, IE goes into quirks mode where the box model is all screwed up (and we are all still paying the price for that). See the article about doctypes under "Articles" above and use html strict.
Jun 6 '07 #2
Ok... I read the article... I don't have the doctype on the very first line... I will try to move the line and test it with IE... Thnx!
Jun 6 '07 #3
Ok.... I tried it, but it didn't work... I've pasted the following line at the very top of my document:
[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
[/HTML]

Any further suggestions?
Jun 6 '07 #4
drhowarddrfine
7,435 Expert 4TB
I would have used html strict but no matter.

<select> elements are form elements and you don't have them enclosed properly. Validate your code for that list of errors that needs fixing.
Jun 6 '07 #5
How do you mean that I haven't enclosed them properly?
Jun 7 '07 #6
Ok... I found the problem: Selectboxes and ActiveX objects are always on top of everything. Except for iFrames. They can overlap Selectboxes and other objects can overlap iFrames. But still have one problem: How do I set the height of the iFrame to be the exact height of the DIV? I tried getting the height with getComputedStyle, but IE doesn't support that one. So I tried iFrame.currentStyle.height, but this returns auto. Could anyone tell me how I can get the height of the DIV?
Jun 8 '07 #7

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

Similar topics

12
by: Tom Szabo | last post by:
Hi, Just wondering if there are any disadvantage in absolute positioning controls on a page? In example instead of putting the text fields into a table to align properly, one would absolute...
7
by: Griff Miller | last post by:
Please see http://home.houston.rr.com/gmiller15/css/vertprob.html . In mozilla 1.6/1.7 it looks the way I want it, with a thin separation between the two boxes. In IE6, the two boxes touch, which...
1
by: Siegfried Heintze | last post by:
I want to implement drag and drop for tables, divs, spans. The problem is that I don't know how wide or long my tables, divs and spans are going to be in advance so I cannot use absolute...
4
by: mike eli | last post by:
Hi, I have several absolute positioned elements inside an absolute positioned DIV. I would like one of the nested elements to have a dynamic width. I set it's left and right attributes to 5, so...
4
by: Alan Silver | last post by:
Hello, Having been a light reader of this ng for a few months now (after several years absence), I have noticed that absolute positioning seems to be considered a Very Bad Thing around here....
3
by: horusprim | last post by:
Is there a CSS absolute positioning rendering bug in FF1.02 and IE 6? I have been experimenting with precision absolute positioning in CSS. The following test content was used in the...
2
by: nonsensitor | last post by:
I'm just learning xhtml & css, primarily from westciv's online tutorials and css guide. I've run into a couple of problems with a page I'm developing that I can't figure out. The first problem is...
6
by: Mark | last post by:
hi, i'm trying to position something in the top right corner of a container, but i can't seem to figure out how to get it working. here's the html <div class='thumb'><a href='image.jpg'><img...
20
by: mehstg1319 | last post by:
Hi there Not sure if anyone can help me, I am working on a site for my university, and am having a bit of trouble with css positioning. I am very new to css and do not know very much about it....
14
by: Fistro | last post by:
I'm trying to find a design that would allow me to build web pages without having to worry about compatibility issues (not too much, in any case,,,) I've came across this CSS layout technique:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.