Forum Moderators: not2easy

Message Too Old, No Replies

IE ignoring text size, but colour & font OK

         

TheWebMistress

9:02 am on May 8, 2009 (gmt 0)

10+ Year Member



Hello, Im having a problem with IE and some css on a php page.
Although IE is recognising the font & colour its completely ignoring the size while other browsers show the text correctly.
This is the code Im using...

<style type="text/css">

body,td,th {
font-family: Verdana;
font-size: 5px;
color: #666666;
font-weight: bold;
}

</style>

Ive tried attaching a style sheet & still no luck. Any help would be greatly appreciated.
Thanks :)

BillysProgrammer

12:03 pm on May 8, 2009 (gmt 0)

10+ Year Member



Depending on the browser (mainly IE 6 and below) this happens. IE 6 and below doesnt always work when you just put body { } so try using the star hack.

<style type="text/css">
* html, body, td, th { }
</style>

BillysProgrammer

12:04 pm on May 8, 2009 (gmt 0)

10+ Year Member



I forgot to add, if that does not work, just try this to make everything that, and if something changes, only change the specific things like color.

<style type="text/css">
* { }
td, th { }
</style>

TheWebMistress

7:55 pm on May 9, 2009 (gmt 0)

10+ Year Member



Hello, thankyou for the reply :)

I tried this code first

<style type="text/css">

* html,body,td,th {
font-family: Verdana;
font-size: 5px;
color: #666666;
font-weight: bold;
}

</style>

which had no effect. And then I tried this code

<style type="text/css">

* { }
td, th {
font-family: Verdana;
font-size: 5px;
color: #666666;
font-weight: bold;
}

</style>

which changed the font in all browsers to Arial displayed in black and alterations to font, size etc have no effect.
So it seems this code isnt working :(

SuzyUK

8:00 pm on May 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it should never had had an effect :( sorry BP

I think, you need to tell us what Doctype you're using and give us a sample that works or doesn't work IN IE5/6

TheWebMistress

12:22 pm on May 10, 2009 (gmt 0)

10+ Year Member



Heyha, agg this is so annoying *bangs head* I cant work out why it would ignore only text size in ie :(

swa66

10:14 pm on May 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



5px is kinda small, I've seen IE act funny on very small text sizes myself as well.

tangor

10:20 pm on May 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Text that small would make me (as a user) override your formatting either by zooming or removing all style.

Meanwhile, check your doc type and clear your browser cache.

TheWebMistress

2:53 pm on May 11, 2009 (gmt 0)

10+ Year Member



It was doing the same thing in 12px, 10px before I dropped it to 5px.
Ive checked the doc type, validated tags etc, still no dice in ie.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<style type="text/css">
body,td,th {
font-family: Verdana;
font-size: 5px;
color: #666666;
font-weight: bold;
}
</style>
</head>

[edited by: TheWebMistress at 3:03 pm (utc) on May 11, 2009]