z-index automatically set by Visual Studio

M

Mike

I would like to know if it is possible to stop VS from automatically
assigning a z-index to a drop down list when I add it to my web page in
design mode. Or if that is not possible, how can I tell VS to not
change a z-index that I have already modified.

Here is the situation I am running into in VS .NET 2003.

1)Create a new web project
2)Add an html dropdown list from the toolbox to my page
3)Modify the "style" property in the properties window to a lower
value, for example 1
4)everything is ok
5)Add another dropdown list from the toolbox to my page
6)Now check the properties of the first ddl. You'll notice that the VS
has automatically changed the z-index back to 101.

I want the z-index of the first ddl to remain at 1. Can this behavior
be turned off or altered?

Thanks in advance
Mike
 
Z

Ziemowit

It said:
I want the z-index of the first ddl to remain at 1. Can this behavior
be turned off or altered?
Vs 2003 like have tendence to change html code in his own vision. Use css
styles to obey the problem.

Ziemowit
 
M

Mike

I have tried to use a css style to override the style setting. I
modified the css to set the z-index of the "select" element and that
did not work. I also tried creating my own class in the css and then
set the "class" property for the dropdown list to my new class. That
also did not work. I believe the inline style assigned to the dropdown
list is getting a higher priority than the element setting and class
setting in the css file.

The actual html code for the dropdown list looks like this:

<SELECT class="myteststyle" style="Z-INDEX: 101; LEFT: 68px; TOP:
112px">
<OPTION value="test" selected>test</OPTION>
</SELECT>

Any other thoughts?

Thanks,
Mike
 
Z

Ziemowit

And this is source of your problem. In grid positioning VS set up
position of each control using absolute positioning in css. Its
innatural and stupid. Set up positioning to flow (or remove positioning
attribute from body - its the same). You will get normal html flow and
VS will leave style property to you.

Ziemowit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top