Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Css For Width Of A Label Asp.net

Posted on 2009-07-09
1
Medium Priority
?
357 Views
Last Modified: 2012-05-07
I am trying to make the width of my label 400px (so its as long as my gridview) so I simply set the width property in the css for the label to 400px. For some reason it doesnt work. What can I do to make the width of the label extend to 400px so its the same size as the grid?
 The effect I am looking for:
Since the labels background color is gray I want to see that background color extend the length of the grid right now it only extends to the length of the text in the label.

.r_num_Label
{
    font-family: Tahoma;
    font-size: large;
    font-weight: bolder;
    font-style: normal;
    color: #000000;
    background-color: #C0C0C0;
    width: 400px;
}
.Grid
{
    border-color: #E7E7FF;
    width: 400px;
}

Open in new window

0
Comment
Question by:npl77
1 Comment
 
LVL 8

Accepted Solution

by:
MrAgile earned 2000 total points
ID: 24819525
hi There,

try:

.r_num_Label
{
    font-family: Tahoma;
    font-size: large;
    font-weight: bolder;
    font-style: normal;
    color: #000000;
    background-color: #C0C0C0;
    width: 400px;
display:block;
}
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question