...

View Full Version : Styling Problems: Probably poor coding



pardicity3
12-21-2002, 11:52 PM
I am currently working on a site that is more or less just for my entertainment. I was messing around with my coding one day when I ran into a problem:

I have a <td> that is given a css class. Now that <td>'s ttext should be x-small and verdana. But for some reason it is displaying at the default size and in Times New Roman font. I have done a lot with css, and I have other text that is specified using css that works. I am really stumped with this.

I have uploaded the site so that it might be easier to find a solution. The css is still in the header of the page, so it shouldn't be a problem to look at. Here is the link:

http://www.mikesadventures.net/trial

Hopefully this is an easy problem. I figure that it is just a poor coding problem that I can't find and will finally find right before I get a response;) !

Oh and also, I have a big banner image on that page that I haven't taken time to compress, so sorry if it takes a while to load it!

Thanks for your help!

zoobie
12-22-2002, 02:58 AM
My guess is that it's defaulting to your font/color because it is mine in IE6. I've never seen x-small in css so why not try:

.content {font:normal 8 verdana, arial, times new roman; color: #000000; background-color: transparent;}

in there...:D

PauletteB
12-22-2002, 03:47 AM
.linkbanner {border: 1px solid #666666'}

should be

.linkbanner {border: 1px solid #666666;}

pardicity3
12-22-2002, 05:33 PM
PauletteB, thanks a lot. I knew it was a simple misplaced character--it always is! That worked the trick and now my page is working out the way I wanted it to. Thanks a lot.

Oh and Zoobie, I took this from http://www.w3c.org/TR/REC-CSS1#font-size:

<absolute-size>
An <absolute-size> keyword is an index to a table of font sizes computed and kept by the UA. Possible values are: [ xx-small | x-small | small | medium | large | x-large | xx-large ]. On a computer screen a scaling factor of 1.5 is suggested between adjacent indexes; if the 'medium' font is 10pt, the 'large' font could be 15pt. Different media may need different scaling factors. Also, the UA should take the quality and availability of fonts into account when computing the table. The table may be different from one font family to another.

I like using sizes like x-small instead of saying 8px or something like that because, when you use x-small, the font size can still be changed by the user, but when you specify 8px it can't. You never know when someone with an 1600x1200 resolution screen isn't going to be able to read your text!

zoobie
12-22-2002, 08:37 PM
Coo. The thing is, the user setting throws the display off kinda defeating the style. I like to know approximately what I'm getting. Whatever works for you.

In the future, when something goes wrong, you can look at the line it happens in or the line before and usually find it. In this case, it's .linkbanner right before the .content class...:D

pardicity3
12-22-2002, 08:46 PM
I know exactly what you are saying with zoobie. But with my layout, I have designed it so that even on the "Largest" text setting, nothing get's screwed up. The page dimensions stay the same and the text is the only thing that changes. I am actually quite proud of it. Try it out on my site if you wish!

And thanks for the tip about looking at the lines before the error. Whenever something like this happens, I always tell myself to do just that, and then I end up forgetting!!

Catman
12-23-2002, 09:57 PM
You can also use em or ex as your unit of measure for elements to maintain some measure of control over the page appearance.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum