Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 14th, 2010, 05:28 AM
Registered User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Button Change style

Hi,

I have a button which I'm assigning its css class on run time.
FetchDataButton1.CssClass = buttonCssStr;

.button1024
{
width: 120;
/*width: auto;*/
height: 40;
/*height: auto;*/
}

The problem is that no mater how I'm changing the width and height the button stay at the same size.

2. What the meaning of the value "auto" in width and height properties ?

Thanks,
Ran
  #2 (permalink)  
Old April 14th, 2010, 09:36 AM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

auto means that you leave it to the browser to calculate height and width for you.

Your CSS works, if you try the following HTML with different numbers, you should see the button changes its size.
Code:
<html>
<head>
<style>
.button1024
{
    width: 300;
    height: 200;
}
</style>
</head>
<body>
    <input type="button" class="button1024" value="Click me" />
</body>
</html>
View source in your browser, see whether the class is actually set for the button. Check whether there are conflict CSS applied on the same button.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic change of style rajesh_css Javascript 3 October 10th, 2008 05:45 AM
Change C# application Visual Style niting85 .NET Framework 2.0 0 April 30th, 2007 04:27 AM
change style.backgroundColor the reset all others crmpicco Javascript How-To 2 September 29th, 2005 10:52 AM
Change style attribute of a WebUserControl YiannisF ASP.NET 1.0 and 1.1 Basics 1 July 10th, 2004 03:19 PM



All times are GMT -4. The time now is 09:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.