473,387 Members | 3,781 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,387 software developers and data experts.

IE 6 + CSS Error

Hey guys,
I am running into an error that only occurs with IE 6, it works perfectly in IE7 though. It seems to be a problem with css z-index or something. Here is the style sheet,
Expand|Select|Wrap|Line Numbers
  1. <style>
  2. select {
  3. width:150px;
  4. }
  5. .tbox{
  6. position:absolute;
  7. z-index:1;
  8. width:130px;
  9. }
  10. </style>
  11.  
  12.  
What I want is for the .tbox ('which refers to all textboxes') to be above all select boxes. When I change the z-index for the .tbox it doesn't change? any ideas?
Thanks,
Brody Smith
Aug 3 '07 #1
7 2086
drhowarddrfine
7,435 Expert 4TB
Not tested.

You are missing a '.' before "select" or a '#'.
Also, for z-index to work, both elements must be positioned. Set .select to position:relative. But you don't have them overlapping in anyway right now. You can by adding 'top:0' and give some height to .tbox.

It should be <style type="text/css">
Aug 3 '07 #2
Ok I made those changes and it still doesn't work. Looking online it looks like it is a bug with IE6. It seems odd because if I do it with div layers it works just fine. but if I take a object like select box or text box and put it in the div layer it stops working. I got nothing. . .
http://www.last-child.com/conflicting-z-index-in-ie6/
if anyone has any other ideas let me know
Aug 6 '07 #3
drhowarddrfine
7,435 Expert 4TB
By textbox do you mean <textarea>? I only assumed divs.
Aug 6 '07 #4
drhowarddrfine
7,435 Expert 4TB
It works for me unless I'm still misunderstanding:
Expand|Select|Wrap|Line Numbers
  1. <style type="text/css">
  2.  
  3. .select {
  4. width:150px;
  5. position:relative;
  6. height:150px;
  7. background-color:red;
  8. }
  9. .tbox{
  10.     background-color:yellow;
  11. position:absolute;
  12. top:0;left:0;
  13. z-index:1;
  14. width:130px;
  15. height:130px;
  16. }
  17. </style>
  18.  
  19. </head>
  20. <body>
  21.  
  22. <textarea class="select"></textarea>
  23. <textarea class="tbox"></textarea>
  24.  
  25. </body>
Aug 6 '07 #5
That works but when you put a input type="text" and a <select></select instead of the textarea it doesn't work.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <style type="text/css">
  3. .select {
  4. width:150px;
  5. position:relative;
  6. height:20px;
  7. background-color:red;
  8. }
  9.  
  10. .tbox{
  11. background-color:yellow;
  12. position:absolute;
  13. top:10;left:10;
  14. z-index:1;
  15. width:130px;
  16. height:20px;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <select>class="select"></select>
  22. <input type="text" class="tbox">
  23. </body>
  24.  
Aug 6 '07 #6
drhowarddrfine
7,435 Expert 4TB
Now I understand. You are talking about selects in forms and textareas. Too late tonight to look at it.
Aug 7 '07 #7
Why does it matter whether it is something of the same type, vs 2 different types?
Aug 10 '07 #8

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

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
2
by: Gregory | last post by:
Hi, One of the disadvantages of using error handling with error codes instead of exception handling is that error codes retuned from a function can be forgotten to check thus leading to...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
1
by: developer | last post by:
Hi All I have made a .NET project. the files included are borland c++ files that i am migrate to VC++ .NET I am using Microsoft Visual C++ .NET 2003. the compilation goes through properly,...
0
by: mchuc7719 | last post by:
Hello, I have a Vb.Net 2005 ClassLibrary, when I try to compile using MSBee, only get errors. Before I to run the command line, I open in notepad the .vbproj and I was add the next line: ...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.