This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > August 2006 > Inline media styles





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Inline media styles
appleboy@gmail.com

2006-08-10, 6:39 pm

Hello to all, and sorry about my poor english :)

I am trying to assign inline styles thru javascript or directly into
the element parameters. E.j:

<span style="font-size:5em;">

I would like to know if is it possible to assign styles inline but only
for @media print. I cannot use external css file and cannot use
<styles></styles>block. I would like something like that:

<span style="(media screen)font size:5em;(media print):font-size:9em;">

Thanks in advance

Andy Dingley

2006-08-14, 6:47 pm


appleboy@XXXXXXXXXX wrote:

> I would like to know if is it possible to assign styles inline but only
> for @media print.


No.

> I cannot use external css file and cannot use
> <styles></styles>block.


You could probably still use <style ...> ... </style>

Although it's required to place this in the <head> and not the <body>,
in practice if you place it in the <body> then the page will be
invalid, but most browsers will still process the stylesheet correctly.
This is a useful hack! It also works for a:hover {}

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews