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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aligning the text of a link button???

Status
Not open for further replies.

IndyGill

Technical User
Jan 15, 2001
191
GB
Hi

I have an asp.net app that I am working on and I am using a link button and want to align the text inside the text button. The text of the link button will be dynamic which I will populate from a string. I also need the link button to be a certain height and width regardles of the size of string i put into it. I have managede to do this so far however I would like the text in the link button to always be central (width) and in the middle of the button (height). However a link button does not come with an align syntax

My syntax looks like the following:

<asp:linkbutton id=&quot;Summary&quot; runat=&quot;server&quot; BackColor=&quot;Gray&quot; Width=&quot;100px&quot; Height=&quot;30px&quot;><%=strText%> </asp:linkbutton>

Eg, What is hapening
_____________________
|My string |
| |
|____________________|

What I would like to hapen is:

_____________________
| |
| My string |
|____________________|

A style sheet didnt work...... any ideas!!!

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top