Just inherited a site... trouble with CSS (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


cooper -> Just inherited a site... trouble with CSS (1/19/2004 20:58:20)

I just took over a client's site and I am having an issue with the external CSS they have. It reads like this:

border {
border: #989898;
border-style: solid; border-top-width: thin;
border-right-width: thin;
border-bottom-width: thin;
border-left-width: thin
}
.tight {
border: #989898;
border-style: solid;
border-top-width: thin;
border-right-width: thin;
border-bottom-width: thin;
border-left-width: thin
}
a:link {
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif
text-decoration: underline;
color: #989898;

}
a:hover {
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif
color: #989898;
text-decoration: none;
}
a:active {
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif;
color: #989898;
text-decoration: underline;
}
a:visited {
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif
color: #989898;
text-decoration: underline;
}
body {
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif
font-size: 8pt;
color: #989898;
top: 0px;
clip: rect(0px auto auto auto);
}
p {
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif
font-size: 8pt;
color: #989898;
top: 0px;
clip: rect(0px auto auto auto);
}
TD {
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif
font-size: 8pt;
color: #989898;
top: 0px;
clip: rect(0px auto auto auto);
}


Yet when I add text to a page, it defaults to Arial and is 12pt. I don't have "Syntax" installed as a font on my system (does anyone?), but I am more concerned about the size of the text.

What am I missing?




c1sissy -> RE: Just inherited a site... trouble with CSS (1/19/2004 21:20:47)

Hi Cooper,
First of all your style sheet is all out of order.

Body should be the first thing styled.
Your links are out of order, they need to be in a specific order for them to work correctly, link - visited - hover - active (I believe that this is the correct order)

Parts of your rules are missing the ;
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif
shouldl be
font-family: Syntax, Arial, Verdana, Helvetica, sans-serif;

If I am remembering correctly the style sheet should be such as
body
h1 etc....
p
img
lists


I'm not exactly sure if I have the images and lists correct but I believe that the order for the other things are correct. Also your classes would follow this.

Also, Syntax? is that a font name? If not, it does not belong in the font-family. Also if you are going to use a shorthand with font there is a way that you need to set that up as well. It also needs to be in order. Same with the border, margin padding,= top, right, bottom,left- this is the way that this should be. Always clockwise.

Ihope that I have not been too confusing in how i explained this and that it helps you out a bit. I have not really looked at all the styles themselves, just a glance to get you started.




Giomanach -> RE: Just inherited a site... trouble with CSS (1/20/2004 4:25:51)

Deb is right, the CSS is totally in the wrong order. BTW Mom, the img one isn't a valid CSS style, I tried to use it a while ago in Dreamweaver and it would not validate at all.

The links need to be:

a:link
a:visited
a:hover
a:active


Body needs to be first

Why bother with the p? that is covered by body

td can be integrated into body:

body, th, td {

....................
}

Syntax is a custom font, see if it is in any of the zip files here:

http://briefcase.yahoo.com/gio_manach

login: gio_manach
Password: please


Dan




c1sissy -> RE: Just inherited a site... trouble with CSS (1/20/2004 7:49:38)

quote:

BTW Mom, the img one isn't a valid CSS

According to Cascading Style Sheets By Design, Yes it is.[;)]

ANY element that is an html element is styled with css. block leve or inline level.[;)]
quote:

Why bother with the p? that is covered by body

As stated above, any element is styleable, and you should always decalre your fonts in your p and in your body due to browser issues. Plus you can give your p different styles then what you give your body. Also, you should give your font sizes in your p instead of your body. Not sure of the reason, but that also is covered in the books.

Also, unless you are giving your table the same styles as your body, you don't need to cover them in body. If you are using css positioning with divs, which is basically what css is about, you won't need tables to do your page layout. Tables are for data, not for layout.




Giomanach -> RE: Just inherited a site... trouble with CSS (1/20/2004 7:52:25)

quote:

ORIGINAL: c1sissy

quote:

BTW Mom, the img one isn't a valid CSS

According to Cascading Style Sheets By Design, Yes it is.[;)]

ANY element that is an html element is styled with css. block leve or inline level.[;)]


Probably me and my typo's lol. It wouldn't validate when I tried it about a month ago, but I did only just upgrade to MX 2004 less than a month ago, so I'll try again [;)]

quote:

Tables are for data, not for layout.


I only find them useful for centering my content on the page now [:)]




c1sissy -> RE: Just inherited a site... trouble with CSS (1/20/2004 8:19:01)

The only thing that I know of that won't validate is when you style the scroll bar, plus this is only something that is availble when you have IE.
CSS2 has some newer elements that are a tad touchy with browsers, but I believe that they validate. They just aren't too browser friendly yet.

Cooper, how did you make out with the style sheets? Are they working any better?

<edit>anxiously awaiting Mhaircaish's reply to this thread[;)]</edit>




Giomanach -> RE: Just inherited a site... trouble with CSS (1/21/2004 7:59:23)

quote:

<edit>anxiously awaiting Mhaircaish's reply to this thread </edit>


Your not the only one, I'm waiting for him to come and slaughter my posts [:D]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875