Header Labels

  • Thread starter Thread starter Mel
  • Start date Start date
M

Mel

I created a header that adjusts with the size of the browser windows.
How do I place labels in the header section so they also maintain
their position when the window is resized? One of the labels is
constant but the rest will be entered programmatically, for example,
the users name, their company, city, state and zip.


My example code:
<body>
<form id="form1" runat="server">

<div style="z-index: 103; margin: 0px; background:
url(logo_ucd.gif) black fixed no-repeat center center; font-family:
Verdana; height: 95px; valign: top; overflow: visible;" >

<div id="Content" style="z-index: 100; left: 13px; width:
1017px; position: absolute;
top: 114px; height: 695px; background-position: center
center; background-attachment: fixed; background-image:
url(logo_firestone_shield_WM.gif); background-repeat: no-repeat;">

<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div style="z-index: 102; position: absolute; top: 100%;
valign: bottom; margin: 0px; width: 100%; background-color: red;
overflow: visible; font-family: Verdana;">
</div>
</form>
</body>
 
Is there any specific reason why you are using absolute positioning? With
flow layout and relative positioning everything will resize automatically.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net




I created a header that adjusts with the size of the browser windows.
How do I place labels in the header section so they also maintain
their position when the window is resized? One of the labels is
constant but the rest will be entered programmatically, for example,
the users name, their company, city, state and zip.
My example code:
<body>
<form id="form1" runat="server">
<div style="z-index: 103; margin: 0px; background:
url(logo_ucd.gif) black fixed no-repeat center center; font-family:
Verdana; height: 95px; valign: top; overflow: visible;" >
<div id="Content" style="z-index: 100; left: 13px; width:
1017px; position: absolute;
top: 114px; height: 695px; background-position: center
center; background-attachment: fixed; background-image:
url(logo_firestone_shield_WM.gif); background-repeat: no-repeat;">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div style="z-index: 102; position: absolute; top: 100%;
valign: bottom; margin: 0px; width: 100%; background-color: red;
overflow: visible; font-family: Verdana;">
</div>
</form>
</body>- Hide quoted text -

- Show quoted text -

Absolute must be the Visual Studio default. Even if I change it to
relative and drag a label on a Header <DIV> section the label does not
appear.
 
Are you with 1.1? It defaults to GridLayout. If so, just get rid of the
MS_POSITIONING="GridLayout" attribute in the <body> element

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Mel said:
Is there any specific reason why you are using absolute positioning? With
flow layout and relative positioning everything will resize
automatically.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP
[ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net




I created a header that adjusts with the size of the browser windows.
How do I place labels in the header section so they also maintain
their position when the window is resized? One of the labels is
constant but the rest will be entered programmatically, for example,
the users name, their company, city, state and zip.
My example code:
<body>
<form id="form1" runat="server">
<div style="z-index: 103; margin: 0px; background:
url(logo_ucd.gif) black fixed no-repeat center center; font-family:
Verdana; height: 95px; valign: top; overflow: visible;" >
<div id="Content" style="z-index: 100; left: 13px; width:
1017px; position: absolute;
top: 114px; height: 695px; background-position: center
center; background-attachment: fixed; background-image:
url(logo_firestone_shield_WM.gif); background-repeat: no-repeat;">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div style="z-index: 102; position: absolute; top: 100%;
valign: bottom; margin: 0px; width: 100%; background-color: red;
overflow: visible; font-family: Verdana;">
</div>
</form>
</body>- Hide quoted text -

- Show quoted text -

Absolute must be the Visual Studio default. Even if I change it to
relative and drag a label on a Header <DIV> section the label does not
appear.
 
Are you with 1.1? It defaults to GridLayout. If so, just get rid of the
MS_POSITIONING="GridLayout" attribute in the <body> element

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net




Is there any specific reason why you are using absolute positioning? With
flow layout and relative positioning everything will resize
automatically.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP
[ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net

I created a header that adjusts with the size of the browser windows.
How do I place labels in the header section so they also maintain
their position when the window is resized? One of the labels is
constant but the rest will be entered programmatically, for example,
the users name, their company, city, state and zip.
My example code:
<body>
<form id="form1" runat="server">
<div style="z-index: 103; margin: 0px; background:
url(logo_ucd.gif) black fixed no-repeat center center; font-family:
Verdana; height: 95px; valign: top; overflow: visible;" >
<div id="Content" style="z-index: 100; left: 13px; width:
1017px; position: absolute;
top: 114px; height: 695px; background-position: center
center; background-attachment: fixed; background-image:
url(logo_firestone_shield_WM.gif); background-repeat: no-repeat;">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div style="z-index: 102; position: absolute; top: 100%;
valign: bottom; margin: 0px; width: 100%; background-color: red;
overflow: visible; font-family: Verdana;">
</div>
</form>
</body>- Hide quoted text -
- Show quoted text -
Absolute must be the Visual Studio default. Even if I change it to
relative and drag a label on a Header <DIV> section the label does not
appear.- Hide quoted text -

- Show quoted text

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional
Microsoft Visual Basic 2005
Microsoft Visual Web Developer 2005
 
I do everything in layout in the HTML view and don't have much experience
with the designer. You can always switch to HTML and insert controls there.
This can give you a better idea what's going on.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Mel said:
Are you with 1.1? It defaults to GridLayout. If so, just get rid of the
MS_POSITIONING="GridLayout" attribute in the <body> element

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP
[ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net




On Jun 26, 2:22 am, "Eliyahu Goldin"
Is there any specific reason why you are using absolute positioning?
With
flow layout and relative positioning everything will resize
automatically.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP
[ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net
I created a header that adjusts with the size of the browser windows.
How do I place labels in the header section so they also maintain
their position when the window is resized? One of the labels is
constant but the rest will be entered programmatically, for example,
the users name, their company, city, state and zip.
My example code:
<body>
<form id="form1" runat="server">
<div style="z-index: 103; margin: 0px; background:
url(logo_ucd.gif) black fixed no-repeat center center; font-family:
Verdana; height: 95px; valign: top; overflow: visible;" >
<div id="Content" style="z-index: 100; left: 13px; width:
1017px; position: absolute;
top: 114px; height: 695px; background-position: center
center; background-attachment: fixed; background-image:
url(logo_firestone_shield_WM.gif); background-repeat: no-repeat;">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div style="z-index: 102; position: absolute; top: 100%;
valign: bottom; margin: 0px; width: 100%; background-color: red;
overflow: visible; font-family: Verdana;">
</div>
</form>
</body>- Hide quoted text -
- Show quoted text -
Absolute must be the Visual Studio default. Even if I change it to
relative and drag a label on a Header <DIV> section the label does not
appear.- Hide quoted text -

- Show quoted text

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional
Microsoft Visual Basic 2005
Microsoft Visual Web Developer 2005
 
Back
Top