...

View Full Version : CSS and fieldsets--- Explanation needed



codingmasta
12-22-2006, 09:15 PM
May i ask if we can control the border-attributes of fieldsets...
e.g.


<style>
fieldset.1{
border-top: #c08933;
border-bottom: #e45f2e;
bottom-left: #65752e;
border-right: #08ceff;
border-width: 1px dotted
}
</style>

Now CAN IT BE???

_Aerospace_Eng_
12-22-2006, 09:36 PM
Yes you can but class or ids can't begin with numbers or special characters.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
fieldset.one {
border-top: 1px dotted #c08933;
border-bottom: 1px dotted #e45f2e;
border-left: 1px dotted #65752e;
border-right: 1px dotted #08ceff;
}
</style>
</head>

<body>
<fieldset class="one">
This is in a fieldset
</fieldset>
</body>
</html>

codingmasta
12-22-2006, 09:40 PM
ty :)

Arbitrator
12-22-2006, 11:20 PM
fieldset.1{
border-top: #c08933;
border-bottom: #e45f2e;
bottom-left: #65752e;
border-right: #08ceff;
border-width: 1px dotted
}bottom-left isnít a valid property and you canít declare a border style via the border-width property.


Yes you can but class or ids can't begin with numbers or special characters.I thought so too, but, after trying to look that up earlier, I donít see anything in the spec that says that classes canít begin with numbers. Such a class is also valid according to the W3C CSS Validator.

The ID is, of course, invalid, though I get some cryptic error message when passing it through the validator:

In CSS1, an id name could start with a digit ("#55ft"), unless it was a dimension ("#55in"). In CSS2, such ids are parsed as unknown dimensions (to allow for future additions of new units)To make ".1" a valid id, CSS2 requires the first digit to be escaped ("#\31")



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum