...

View Full Version : CSS, Form Fields and You....



OpenIntro
03-09-2005, 08:19 PM
Hi there! I am currently attempting to build a list of styles for a default set of HTML pages....what I mean is that the pages are going to have the styles in the HEAD of the html page, but the content in the BODY is going to be dynamically generated....

My question is if it is possible to have seperate styles for for fields, specifically TEXT BOXES and PUSH BUTTONS, without using CLASSES. Because these pages are built dynamically, it's not possible to use classes in the field.



<STYLE TYPE="text/css">
<!--
INPUT {
background: #99CCFF;
color: #17268C;
font-size: 12px;
font-family: Arial;
border: 1px solid #17268C
}
-->
</STYLE>


The above is what I have so far, but the style above is applying the same color and borders to my buttons and my input boxes. I would really like to make them seperate.

Any help would be appreciated!

_Aerospace_Eng_
03-09-2005, 08:36 PM
well how are they dynamically created, couldn't you make it to where the content created also creates a class in the input field?

mcdougals4all
03-09-2005, 08:46 PM
Attribute selectors are nice. Too bad about IE, though you could probably accomplish the same thing with some javascript, by finding inputs of the right type.

Attribute selectors:
http://css.maxdesign.com.au/selectutorial/selectors_attribute.htm

OpenIntro
03-09-2005, 09:09 PM
Aero, the HTML is dynamically created by a software product that I am working on....

It looks like the attribute selectors would be the perfect solution....what are they supported by? Why not IE?! lol....

I think I have solved the problem though, using div tags and styles for indivudal divs....looks like I can do what I need to do in this case! Thanks for the help!

Jalenack
03-09-2005, 09:34 PM
Dean Edward's IE7 javascript stuff gives IE attribute selector capabilities, does it not?

here's his example:

http://dean.edwards.name/IE7/compatibility/attr-value.html

It may be confusing at first, but IE7 is basically a javascript that turns on many feature enhancements in Explorer 5 and 6. I believe this is the correct module:

http://dean.edwards.name/IE7/src/?ie7-css3.js

Good luck!

Maybe its this one: http://dean.edwards.name/IE7/src/?ie7-css2.js You could just install the whole package...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum