Form Question

  • Thread starter Thread starter Miguel Dias Moura
  • Start date Start date
M

Miguel Dias Moura

Hi,

I allways have problems with form elements.
I was creating a design where I want a drop down list width to be 100%
of the width of the div where it is placed.

<div id="myDiv">
<asp:DropDownList ID="search" runat="server" Width="100%">
</div>

The CSS is:

#myDiv {width=200px;}.

It works in IE and doesn't work with Firefox. Why?

Forms and its elements make me crazy all the time.
Testing it for both browsers made it even worse.

Thanks,
Miguel
 
its not a supported standard would be my bet. IE supports a lot of
tags/values that aren't valid in other browsers.
Look it up... w3c.org I think...
 
in
<asp:DropDownList ID="search" runat="server" Width="100%">

the width is rendered as a inline style which works in both browsers,
except, that asp.net (version 1 and 1.1) does not render inline style
commands if the browser is not IE. the easiest fix is to use a css style to
get around this asp.net limitation.

-- bruce (sqlwork.com)


| Hi,
|
| I allways have problems with form elements.
| I was creating a design where I want a drop down list width to be 100%
| of the width of the div where it is placed.
|
| <div id="myDiv">
| <asp:DropDownList ID="search" runat="server" Width="100%">
| </div>
|
| The CSS is:
|
| #myDiv {width=200px;}.
|
| It works in IE and doesn't work with Firefox. Why?
|
| Forms and its elements make me crazy all the time.
| Testing it for both browsers made it even worse.
|
| Thanks,
| Miguel
|
 
Back
Top