Solved

Css For Width Of A Label Asp.net

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

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