How can I change the backgroundcolor and the fontcolor and that sort of stuff of a selectionfield, like on the picture. I bet it's possible in CSS, but how am I gonna do it??? Please help me out some1!
Thanks, Koenie
Css Questionselection form thing
Page 1 of 1
11 Replies - 1476 Views - Last Post: 04 September 2002 - 11:51 AM
Replies To: Css Question
#2
Re: Css Question
Posted 02 September 2002 - 12:33 PM
You mean like in a form?
Well, you can do it with classes or by selecting elements.
If you do it with elements it looks like this:
input {background: #000; color: #fff; font-family: verdana; font-size: 11px; border: dotted 1px #fff;}
Using that code ALL input tags (which means text boxes, buttons, etc.) will have that styling.
If you use classes it goes more like:
.formstyles {background: #000; color: #fff; font-family: verdana; font-size: 11px; border: dotted 1px #fff;}
and then in the html you put:
<input type="text" class="formstyles" />
The foreward slash is just for xhtml. Eliminate it if your not using xhtml.
Well, you can do it with classes or by selecting elements.
If you do it with elements it looks like this:
input {background: #000; color: #fff; font-family: verdana; font-size: 11px; border: dotted 1px #fff;}
Using that code ALL input tags (which means text boxes, buttons, etc.) will have that styling.
If you use classes it goes more like:
.formstyles {background: #000; color: #fff; font-family: verdana; font-size: 11px; border: dotted 1px #fff;}
and then in the html you put:
<input type="text" class="formstyles" />
The foreward slash is just for xhtml. Eliminate it if your not using xhtml.
#3
Re: Css Question
Posted 03 September 2002 - 12:16 AM
I mean this thing:
Attached image(s)
#5
Re: Css Question
Posted 03 September 2002 - 01:00 AM
Shouldn't I call it select or something instead of input???
Koenie
Koenie
#6
Re: Css Question
Posted 03 September 2002 - 01:02 AM
you mean something like this
<form name="form1" method="post" action=""> <select name="select" class="styles.css"> </select> </form>
#7
Re: Css Question
Posted 03 September 2002 - 01:15 AM
What if I just want to put these lines in the same html file with the form, should I change something???
Koenie
Koenie
#8
Re: Css Question
Posted 03 September 2002 - 01:46 AM
i dont understand what you doing here.
#9
Re: Css Question
Posted 03 September 2002 - 02:02 AM
OK, I'll explain. I wanna make a selection form thing as in the picture, with the backgroundcolor, the fonttype, fontcolor, and the colors of the button to the right with the \/ on it changed. I want all this style in the document it self:
<html>
<head>
blallalalala
<style>
</head>
<body>
<form>
</body>
</html>
Get it? How do I do that?
Koenie
<html>
<head>
blallalalala
<style>
</head>
<body>
<form>
</body>
</html>
Get it? How do I do that?
Koenie
#10
Re: Css Question
Posted 03 September 2002 - 07:16 AM
ok, i can help, i haven't yet figured out how to change the color of the V but i have figured out how to change the color of the text, background, and how to change the face of the text
i hope that this helps you out a little.
<select name="" style="color: #ffffff; font-size: 8pt; font-family: Verdana; background-color: #006699">
i hope that this helps you out a little.
#11
Re: Css Question
Posted 03 September 2002 - 10:10 AM
Well, you can only change the font, bgcolor, fontcolor, etc. but you cannot change the scrollbar color, or the border.
In this case, use the css code in the stylesheet at the top of the page and then use a class="whatever" to reference it. I avoid using embedded styles like <div style="background: #000;"> because then if you need to update the code you have to hunt for the attribute to change it. I put them inline at the top in the head tag. Does this help?
In this case, use the css code in the stylesheet at the top of the page and then use a class="whatever" to reference it. I avoid using embedded styles like <div style="background: #000;"> because then if you need to update the code you have to hunt for the attribute to change it. I put them inline at the top in the head tag. Does this help?
#12
Re: Css Question
Posted 04 September 2002 - 11:51 AM
Yeah it does help a little, but I'm not quite familiar with CSS. I'm gonna start learning that soon, once I finished my new Javascript book 
Thanks, anyway.
Koenie
Thanks, anyway.
Koenie
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote





|