Solved

Css For Width Of A Label Asp.net

Posted on 2009-07-09
1
347 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

627 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