<div> style changes on page refresh.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nirmalsingh
    New Member
    • Sep 2006
    • 218

    <div> style changes on page refresh.

    hai all,
    i am using asp.net, on first time loading of a page the style is correctly applied for the div but on postback only font style is not applied. i dont know y?
    [HTML]<div id="divEmpSearc hs" class="popup_sc r" style="overflow : auto; width: 150px; position: absolute">
    </div>[/HTML]
    style:
    ------
    [HTML] .popup_scr
    {
    visibility:hidd en;
    border-left:2px solid #000000;
    border-top:1px solid #000000;
    border-right:1px solid #000000;
    border-bottom:5px solid #000000;
    background-color:#EBEBEB;
    font-family:Verdana;
    font-size:12px;
    font-weight:bold;
    color:#787878;
    height:100px;
    }[/HTML]
    plz help me.
    thank you
  • shweta123
    Recognized Expert Contributor
    • Nov 2006
    • 692

    #2
    Hi,

    If you want to apply the style to Div tag using class attribute , you should not use style attribute.

    e.g.

    You can write it like this :
    Code:
    <div id="divEmpSearchs" class="popup_scr" ></div>
    Originally posted by nirmalsingh
    hai all,
    i am using asp.net, on first time loading of a page the style is correctly applied for the div but on postback only font style is not applied. i dont know y?
    [HTML]<div id="divEmpSearc hs" class="popup_sc r" style="overflow : auto; width: 150px; position: absolute">
    </div>[/HTML]
    style:
    ------
    [HTML] .popup_scr
    {
    visibility:hidd en;
    border-left:2px solid #000000;
    border-top:1px solid #000000;
    border-right:1px solid #000000;
    border-bottom:5px solid #000000;
    background-color:#EBEBEB;
    font-family:Verdana;
    font-size:12px;
    font-weight:bold;
    color:#787878;
    height:100px;
    }[/HTML]
    plz help me.
    thank you

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Is your <div> being generated by a Panel or is it a straight <div>?
      Are you changing the style at all in your sever code?

      Comment

      Working...