> This is a set of CSS styles that i have now, are there any ways to bring down the size of them? Or any shortcuts?
You have loads of errors in there. First, let's reformat for the sake of readability. Don't expect help if you can't be bothered to post legible code.
I'm highlighting all the errors in red.
Code:
#button3 {
WIDTH: 20;
Height: 20;
border: 1 solid <%=headFntCol%>;
background-color: #cccccc;
font-weight: bold
}
#button1, #button2 {
WIDTH: 20;
Height: 20;
border: 0 solid <%=headFntCol%>;
background-color: <%=headerCol%>
}
#month {
WIDTH: 65;
Height: 20;
background-color: <%=tableRowHeader%>
}
#year {
width: 57;
height: 23;
background-color: <%=tableRowHeader%>
}
calendar_divsmall {
width: 180;
top: 70;
left: 0;
visibility: hidden
}
main_table {
border: 1;
bordercolor="#000000"
height="660px"
width="700px"
cellpadding="0"
}
Let's look at the errors. First any measurement (excluding zero length measurements, and certain properties such as line-height)
must have a unit of measurement. Explorer allows unitless measurements against the specifications, but these will not work in any other browser.
So, WIDTH: 20;, should be
width: 20px;, I type everything in lowercase for consistency, but that's really a matter of personal preference.
Same with: border: 1 solid <%=headFntCol%>;, it should be
border: 1px solid <%=headFntCol%>;
Here's one that can be shortened:
background-color: #cccccc; can be reduced to
background: #ccc;.
calendar_divsmall and main_table won't do anything at all. I assume these are class or id names. If so you must prepend the appropriate syntax to make the rule complete, a dot for a class name or a hash for an id name.
Finally, this is completely invalid CSS:
border: 1;
bordercolor="#000000"
height="660px"
width="700px"
cellpadding="0"
border: 1;, isn't the same as the HTML attribute border="1", so this probably isn't what you're going for. You probably want
table {
border: 1px solid #000;
}
td {
border: 1px solid #000;
}
This gives you the same as border="1".
CSS properties cannot be written like HTML attributes, it is always the property name, followed by a colon, followed by the value, followed by a semi-colon. No equals, and most of the time, no quotes.
So height="660px" must be height: 660px;
And then there are no CSS properties with the names "bordercolor" or "cellpadding". There are border-color, border-spacing, and border-collapse.
There also exists software to validate your style sheets:
http://jigsaw.w3.org/css-validator/
HTH!
Regards,
Rich
--
[
http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design