Solved

Css For Width Of A Label Asp.net

Posted on 2009-07-09
1
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
MrAgile earned 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generate Unique ID in VB.NET 21 130
asp.net figure out error 3 45
Record locking on classic ASP 3 64
Data Analysis 7 59
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project

734 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