Topic: CSS2 media types (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10933" title="Pages that link to Topic: CSS2 media types (Page 1 of 1)" rel="nofollow" >Topic: CSS2 media types <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 03-04-2003 21:33

Please help me. Nothing happens in IE5. It is supposed to happen.

quote:
<html>
<head>
<style>
@media screen
{
p.test {font-family:verdana,sans-serif; font-size:14px}
}

@media print
{
p.test {font-family:times,serif; font-size:10px}
}
@media screen,print
{
p.test {font-weight:bold}
}
</style>
</head>
<body>
Hey, Hey, Hey!!! What are you doing?
</body>
</html>



quote:
If you use IE 5.0 (or higher) and print this page, you will see that the paragraph under "Media Types" will be displayed in another font, and have a smaller font size than the rest of the text.



This is from here: http://www.w3schools.com/css/css_mediatypes.asp

Thanks very much, in advance.

Hiroki Kozai

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-04-2003 21:48

I'm willing to bet IE 5 doesn't understand @media.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 03-04-2003 22:35

so that quote above is wrong. Thanks a lot. Bye, Slime.

Hiroki Kozai

fraxyl
Bipolar (III) Inmate

From: australia
Insane since: Jul 2002

posted posted 03-05-2003 15:39

<body>
Hey, Hey, Hey!!! What are you doing?
</body>

It doesn't have p tags around it... although I'm not an expert on CSS or HTML, so maybe you don't need the p tags around the text for it to work if it's the only text in body tags... on a tangent, that gave me an idea

<body>dead body</body>

It's a dead body in body tags... ha ha... errr... never mind.

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 03-05-2003 18:53

^ oh lordy

=)

Yup, Fraxyl's got it.

The only thing you specify in the style sheet is "p.test"

So, for that to work, you need your text on your page to be in a <p> with a class of test (ie: <p class="test">Your text</p> ).



Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 03-05-2003 21:39

Hey, Hey, Hey!!! Thanks a lot. It works very well, fraxyl!, DL!!!
I have just printed it. I am very surprised what I got.
Again, thanks a lot.


Hiroki Kozai

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-05-2003 21:52

Oh, haha, serves me right for not actually looking at the page =)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu