Css Question

selection form thing

Page 1 of 1

11 Replies - 1649 Views - Last Post: 04 September 2002 - 11:51 AM

#1 Koenie  Icon User is offline

  • What?!

Reputation: 0
  • View blog
  • Posts: 1,313
  • Joined: 08-July 02

Css Question

Posted 02 September 2002 - 02:58 AM

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
Is This A Good Question/Topic? 0
  • +

Replies To: Css Question

#2 codeman  Icon User is offline

  • w3c fanatic

Reputation: 3
  • View blog
  • Posts: 1,190
  • Joined: 13-August 01

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.
Was This Post Helpful? 0
  • +
  • -

#3 Koenie  Icon User is offline

  • What?!

Reputation: 0
  • View blog
  • Posts: 1,313
  • Joined: 08-July 02

Re: Css Question

Posted 03 September 2002 - 12:16 AM

I mean this thing:

Attached image(s)

  • Attached Image

Was This Post Helpful? 0
  • +
  • -

#4 iamcenz  Icon User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,442
  • Joined: 26-March 01

Re: Css Question

Posted 03 September 2002 - 12:18 AM

that should work there too.
Was This Post Helpful? 0
  • +
  • -

#5 Koenie  Icon User is offline

  • What?!

Reputation: 0
  • View blog
  • Posts: 1,313
  • Joined: 08-July 02

Re: Css Question

Posted 03 September 2002 - 01:00 AM

Shouldn't I call it select or something instead of input???

Koenie
Was This Post Helpful? 0
  • +
  • -

#6 iamcenz  Icon User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,442
  • Joined: 26-March 01

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>

Was This Post Helpful? 0
  • +
  • -

#7 Koenie  Icon User is offline

  • What?!

Reputation: 0
  • View blog
  • Posts: 1,313
  • Joined: 08-July 02

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
Was This Post Helpful? 0
  • +
  • -

#8 iamcenz  Icon User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,442
  • Joined: 26-March 01

Re: Css Question

Posted 03 September 2002 - 01:46 AM

i dont understand what you doing here.
Was This Post Helpful? 0
  • +
  • -

#9 Koenie  Icon User is offline

  • What?!

Reputation: 0
  • View blog
  • Posts: 1,313
  • Joined: 08-July 02

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
Was This Post Helpful? 0
  • +
  • -

#10 fyrestorm  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 10
  • View blog
  • Posts: 3,113
  • Joined: 04-April 02

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

<select name="" style="color: #ffffff; font-size: 8pt; font-family: Verdana; background-color: #006699">


i hope that this helps you out a little.
Was This Post Helpful? 0
  • +
  • -

#11 codeman  Icon User is offline

  • w3c fanatic

Reputation: 3
  • View blog
  • Posts: 1,190
  • Joined: 13-August 01

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?
Was This Post Helpful? 0
  • +
  • -

#12 Koenie  Icon User is offline

  • What?!

Reputation: 0
  • View blog
  • Posts: 1,313
  • Joined: 08-July 02

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 :D
Thanks, anyway.

Koenie
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1