Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

label height

Status
Not open for further replies.

griffitd

Programmer
Aug 20, 2002
189
GB
I want a web control bar that represents 4 values(read from a database) that add up to 100.

I have this working using four label and changing the width property.

The problem I has is that the height of the label won't go small enough.

What else could I use??
 
you need to set as style attribute font-height:1px to make it small enough

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
I think I may have done this the wrong way.

My control uses a web form label.
##############

I've tried to create a web control that I need using a html label. I can change the height to what I require but I need to change this value based on a value from a database.

Previoulsy I created properties and referenced them from my web form, chainging the width property.
 
you might try to use a table with one row and one cell. the height would be determined at design time (take into account my previous post to make sure you can set the height to less than the font height) and the width of the table can be set programatically based on your database value.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
this works the same way as the label.

Can't get it to go small enough.
 
you need to have at least a character inside the cell (  would be the best since it's a blank character that isn't ignored - non blank space)

look at this pure htm example:
<table width=100px cellspacing=0 cellpading=0 border=0>
<tr>
<td height=4px style="font-size: 1px;" bgcolor="#FF0000">&nbsp;</td>
</tr>
</table>

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Looks good.

How can I get the table to be side by side instead of on top of one another??

Sorry I'm new to this
 
you need to define a master table with one row and four cells, each containing of of these tables.

this is the easiest way

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top