Solved

Css For Width Of A Label Asp.net

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now