Using CSS Rule together with CSS Class in server side controls

This is a discussion on "Using CSS Rule together with CSS Class in server side controls" within the Web Page Design section. This forum, and the thread "Using CSS Rule together with CSS Class in server side controls are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 3rd, 2006, 09:49
New Member
Join Date: May 2006
Location: UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Using CSS Rule together with CSS Class in server side controls

Hi,
I design my web site in Dreamweaver and then use Web Developer 2005 Express for the dynamic stuff. I then amalgamate all the work I have done in Dreamweaver into 2005 Express.

However with the new server side controls I do not know how to add a CSS class together with a CSS rule.

In the normal client side control in Dreamweaver I have -

<input name="txtPassword" type="password" class="Input" id="SpacerBottom" />

In the server side controls the ID keyword is used now -

<asp:TextBox ID="txtPassword" runat="server" Style="z-index: 107" CssClass="Input" ></asp:TextBox>

I have tried to use the name="txtPassword", but it ignores this.

I would really like to know how I can use a class and an id selector with the new server side controls and would really appreciate some help on this.

Many thanks,
Polly Anna
Reply With Quote

  #2 (permalink)  
Old Aug 3rd, 2006, 13:37
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,948
Blog Entries: 1
Thanks: 0
Thanked 29 Times in 29 Posts
Re: Using CSS Rule together with CSS Class in server side controls

Wouldn't it be better to just do a formname input {} in a style sheet? Maybe I am just missing the point entirely.
__________________
I hate IE 6. Just sayin....
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #3 (permalink)  
Old Aug 3rd, 2006, 14:05
New Member
Join Date: May 2006
Location: UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using CSS Rule together with CSS Class in server side controls

Hi moojoo, not sure how I can use the solution you mention. Could you point me in the right direction as to what this actually does?

Many thanks,

Polly Anna
Reply With Quote
  #4 (permalink)  
Old Aug 3rd, 2006, 14:11
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,948
Blog Entries: 1
Thanks: 0
Thanked 29 Times in 29 Posts
Re: Using CSS Rule together with CSS Class in server side controls

Well, say you had a form named foo. What you could do is declare styles for the elements only contained within forms with the id of #foo.

#foo input {
padding:6px;
width:125px;
border:solid #CCCCCC;
border-width:1px;
}

#foo textarea {
border:solid #CCCCCC;
border-width:1px;
}

#foo input.mybutton {
width:75px;
}

etc.

http://www.sitepoint.com/article/style-web-forms-css
__________________
I hate IE 6. Just sayin....
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)

Last edited by moojoo; Aug 3rd, 2006 at 14:17.
Reply With Quote
  #5 (permalink)  
Old Aug 3rd, 2006, 14:17
New Member
Join Date: May 2006
Location: UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using CSS Rule together with CSS Class in server side controls

Thank you - and yes it is obvious, but I just couldn't see it.

Many thanks,

Polly Anna
Reply With Quote
  #6 (permalink)  
Old Aug 3rd, 2006, 14:17
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,948
Blog Entries: 1
Thanks: 0
Thanked 29 Times in 29 Posts
Re: Using CSS Rule together with CSS Class in server side controls

This is a good article on styling web forms with CSS as well if you need it.

http://www.sitepoint.com/article/style-web-forms-css

Quote:
Originally Posted by Polly Anna View Post
Thank you - and yes it is obvious, but I just couldn't see it.

Many thanks,

Polly Anna
__________________
I hate IE 6. Just sayin....
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #7 (permalink)  
Old Aug 3rd, 2006, 14:20
New Member
Join Date: May 2006
Location: UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using CSS Rule together with CSS Class in server side controls

Thanks that's great
Reply With Quote
Reply

Tags
using, css, rule, together, class, server, side, controls

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java server side technologies asim Webforumz Cafe 0 Jun 20th, 2007 07:47
Server-side form validation strategy.... ginzotech ASP.NET Forum 0 Jun 1st, 2007 15:25
Trouble with Server Side Includes BGarner Classic ASP 3 Jan 20th, 2007 17:16
Server side executables Donny Bahama PHP Forum 4 Dec 30th, 2006 17:59
Client-Side VS Server Side Scripting redev2006 JavaScript Forum 1 Jul 30th, 2005 19:30


All times are GMT. The time now is 16:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43