Results 1 to 7 of 7

Thread: [RESOLVED] Inserting a Label at the bottom of the screen!

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Resolved [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,
    Last edited by blakemckenna; Aug 10th, 2011 at 11:56 AM.
    Blake

  2. #2
    Lively Member
    Join Date
    Jul 2011
    Posts
    127

    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
    Last edited by rj_yan31; Aug 10th, 2011 at 03:09 AM.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    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?
    Blake

  4. #4
    Lively Member
    Join Date
    Jul 2011
    Posts
    127

    Re: Inserting a Label at the bottom of the screen!

    so that's what you mean. yes, it is possible.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    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,
    Blake

  6. #6
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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" />
    Like Archer? Check out some Sterling Archer quotes.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Inserting a Label at the bottom of the screen!

    Kows,

    That's exactly what I was looking for. Thanks for your help!
    Blake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width