Click here to Skip to main content
16,015,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
css is -

CSS
.lblalert {
           position: absolute;
            top: 10px;
            right: 10px;
            height:27px;
            background-color:yellow;
            color:black;
            text-align:center;
            border-radius: 3px;
            padding-left: 20px;
            padding-right: 20px;
            display: inline;
        }

 <asp:Label runat="server" ID="lblAlertMessage" CssClass="lblalert">



and label control is



how to set this at center of screen
Posted
Updated 18-Feb-15 2:31am
v2

1 solution

CSS
.lblalert {
           position: absolute;           
            height:27px;
            background-color:yellow;
            color:black;
            text-align:center;
            border-radius: 3px;
            top: calc(50% - 50px/2); 
            left: calc(50% - 50px/2); 
            
        }
 
Share this answer
 
v6
Comments
sanjaysgh 18-Feb-15 8:52am    
where to call this function
Kochathu Thomas Tinu 18-Feb-15 9:11am    
I just update my answer check this out..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900