[RESOLVED] Inserting a Label at the bottom of the screen!
I have a Web page that is a MasterPage. On this masterpage, I have an asp:Label control at the bottom of the markup. What I'm trying to attempt is have this label be fixed at the bottom of the screen. It's going to be used to display messages. I saw an example of this once using CSS but forget how to do it. Does anyone know how to accomplish this and if so, what is the best method?
Thanks,
Re: Inserting a Label at the bottom of the screen!
i dont really understand the question, if i am not mistaken what u mean is like this:
Code:
<html>
<head>
<style type="text/css">
body
{
background-image:url('smiley.gif');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:bottom;
}
</style>
</head>
<body>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
<p>The background-image is fixed. Try to scroll down the page.</p><br><br>
</body>
try running that code and look for a picture and save it as 'smiley.gif' you can see that the background is on fixed position, tell me if what you mean is like that. hope it helps
Re: Inserting a Label at the bottom of the screen!
Actually, I think that would work. I just need to apply that style to an asp:Label control. I'm sure that's possible...right?
Re: Inserting a Label at the bottom of the screen!
so that's what you mean. yes, it is possible.
Re: Inserting a Label at the bottom of the screen!
I tried using the CSS attributes that you showed and I can't get them to work. How would I do this for an asp:Label control?
Thanks,
Re: Inserting a Label at the bottom of the screen!
Do you want the label to always be on the bottom of the page? If yes, then the CSS used above won't do much. All it does is apply a background at the bottom of the <body> tag. You'll need to position the element itself at the bottom of the page if you want the label always down there.
Try something like this:
Code:
<style type="text/css">
.bottomLabel {
bottom: 0;
display: block;
left: 0;
position: absolute;
text-align: center;
}
</style>
<asp:Label CssClass="bottomLabel" Text="This is a test" />
Re: Inserting a Label at the bottom of the screen!
Kows,
That's exactly what I was looking for. Thanks for your help!