So - should the body be at the top of this?

a:link, a:visited, a:active { text-decoration: none; 
    color: #FAFCF6;
    font-family: tahoma, arial, verdana;
    font-size: 15px;}
a:hover { text-decoration: none; 
    font-family: tahoma, arial, verdana;
    color: #C6CD4B; 
    font-size: 15px;}

TD {
    font-family: tahoma, arial, verdana;
    font-size: 9px;
    color: #F3FEE1; }
.f {
    font-family: tahoma, arial, verdana;
    font-size: 15px;
    color: #F3FEE1; }
.b {font-weight: bold;}
.key{
    font-family: tahoma, arial, verdana;
    font-size: 15px;
    color: #FAFCF6; }
.input {
    border: 0px solid;
    width: 133px;
    height: 17px;
    background-image:url('images/inp.jpg'); 
    background-repeat:no-repeat;
    font-size: 15px;
    color: #000000;}
.button {
    border: 0px solid;
    width: 46px;
    height: 16px;
    background-image:url('images/submit.jpg'); 
    background-repeat:no-repeat;
    font-size: 15px;
    color: #000000;}
.button2 {
    border: 0px solid;
    width: 39px;
    height: 16px;
    background-image:url('images/clear.jpg'); 
    background-repeat:no-repeat;
    font-size: 15px;
    color: #000000;}
.tx {
    border: 0px solid;
    width: 133px;
    height: 42px;
    background-image:url('images/ta.jpg'); 
    background-repeat:no-repeat;
    font-size: 15px;
    color: #000000;}
body {
        background-color: #535B4C;
        padding:0px;
        margin: 0px;
        scrollbar-face-color:#ffffff;
        scrollbar-highlight-color:#535B4C;
        scrollbar-3dlight-color:#535B4C;
        scrollbar-darkshadow-color:#535B4C;
        scrollbar-shadow-color:#535B4C;
        scrollbar-arrow-color:#535B4C;
        scrollbar-track-color:#535B4C;
		font-size: 15px;
}

I was told that this is messy but with no real advice - I am open to suggestions

Recommended Answers

All 2 Replies

Generally speaking, yes. You'll want to define global styles first (like body, anchors, headers, paragraphs, lists, etc), followed by overrides. For example, you're setting font-size: 15px in a bunch of places, when you could get away with doing it once in body, and only setting something different for those elements that require it (like you're table data).

px are not the recommended scalar/measurement
on a .12 dot pitch hi res screen 15px=1.8mm=.07inch high, hardly visible
current best practice is em % as measurements, settings that adjust to screen resolution and user preference. Using the current best practic will also make the site more user friendly, as impaired person wont have to use the horrendous zoom functions on browser windows just to see the site0px is not a valid measurement zero is always just zero 0, 0px will put standards compliant browsers into quirks mode

Yes body should be at the top
typically css is declared in box order, outer box, first box second box
body
table
td
.classes

that way the elements inherit the styles of their parents, the 'C' in 'CSS'

lower case element names
td not TD

edit** most of it scottlway already said

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.