CSS Input Tag Question

Results 1 to 3 of 3

Thread: CSS Input Tag Question

  1. #1
    Join Date
    Dec 1969

    Default CSS Input Tag Question

    Waht is teh CSS if I want to apply a certain design to say textbox and some other design to other form elements like radiobox...

  2. #2
    Join Date
    Dec 1969

    Default RE: CSS Input Tag Question


  3. #3
    Join Date
    Dec 1969

    Default RE: Use

    In CSS, each element that you specify in a style sheet can have any number of classes. You can sort of think of a class as a sub-attribute - [Kind of :-)]. Here&#039;s an example:<BR>Specify a default style for say, the &#060;input&#062; tag...<BR><BR>"INPUT {background-color: beige; font-family: arial}"<BR><BR>All &#060;input&#062; tags will now inherit this style - beige background and Arial as the font.<BR><BR>Now, specify a class for the &#060;input&#062; tag like so...<BR><BR>"INPUT.requiredfield {background-color: red}"<BR><BR>This is what "cascading" style sheets is all about. Any &#060;input&#062; elements will be beige and in Arial unless you specify otherwise. To specify otherwise in your HTML file add the &#039;class&#039; attribute to the element tag like so...<BR><BR>"&#060;input class="requiredfield" type="text"&#062;"<BR><BR>The above field will now pick up the attributes specified in the class statement in your style sheet - i.e. the background of this particular element will be red. The font will still be Arial because this will have been passed down (cascaded) from the default style.<BR><BR>And that&#039;s all there is to it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts