Previous Message
Next Message

Re: [css-d] looking for: "css for specific html tags" reference

Sent by Andrew Clover on 31 January 2002 19:07


jmh [EMAIL-REMOVED]> wrote:

> I'm looking for a reference for cases where you know which html elements
> you want to use, but you aren't sure which css properties will actually
> do anything to them

  http://www.w3.org/TR/REC-CSS2/propidx.html

Is pretty good on this, though you have to understand the jargon a little
first. CSS properties tend to apply to *all* HTML elements, since it's
possible to change how they're displayed completely using the 'display'
property. For example 'width' applies to block-level elements, so you
can't normally set it on an <a> element, which is inline. But if you also
give the <a> 'display: block;', using 'width' will work fine.

> For example,  if you had a textarea input, and you wanted to be able to
> control the scroll-bar

Ah, well, form fields are the big exception. They *should* be susceptible
to all the same CSS that normally applies - borders, padding, colour and so
on - but in practice some browsers implement them using the operating
system's built-in controls, which don't give you anything like that
flexibility. (<select> in IE is the usual suspect.)

CSS also has nothing to say about styling the separate parts of fields that
are built out of multiple parts, such as scroll bars and the file upload
control's parts. This is understandable as not all platforms have the
same 'parts' in the same types of control.

For the specific case you mentioned, there is a way to do it, but it's not
in the standard and only works in IE5.5 up, only on Windows. There are
a whole bunch of properties of the form scrollbar-X-color, where X refers
to different parts of a Windows-style bevelled scrollbar. You can find them
in Microsoft's guide to styles supported by IE here:

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_style.asp

-- 
Andrew Clover
[EMAIL-REMOVED]
http://and.doxdesk.com/
Previous Message
Next Message

Message thread:

Possibly related: