473,385 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Inline media styles

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

Aug 10 '06 #1
1 2671

ap******@gmail.com 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 <headand not the <body>,
in practice if you place it in the <bodythen 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 {}

Aug 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Geoff Cox | last post by:
Hello, I am trying to have 1. web pages in large font 2. web pages with smaller font for printing I am using <link rel="stylesheet" media="print" type="text/css"
8
by: geotso | last post by:
Hi I'm trying to hide from printing a specific element of a page but I don't know how (and if) I could. Here is an example of what I'm trying to do: <h1>Hidden in print mode</h1> <p>Also...
1
by: Garmt de Vries | last post by:
For a long time, I've used CSS to style my webpages, but only for media "screen" and "print". Now I've started looking into styling them for other media like "projection" and "handheld". I'd be...
1
by: Paul | last post by:
<link href="_cmn/styles-screen.css" rel="stylesheet" type="text/css" media="screen" /> <link href="_cmn/styles-print.css" rel="stylehseet" type="text/css" media="print" /> I have the above to...
1
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on...
6
by: dubing | last post by:
Hello everyone, If media is not explicitly specified in link as shown below, what's the default media supposed to be, screen or all? I thought it should be 'all'. <link rel="stylesheet"...
5
by: Dinsdale | last post by:
Without using CSS styles or linked stylesheets, I need to apply formatting to text links that use rollover effects. I can NOT get the underline to show using this technique: <A...
1
by: tdartt | last post by:
Howdy! I'm fairly new to using css. I have two style sheets: <LINK href="printstyle.css" type="text/css" rel="stylesheet" media="print"> Which has (for example): .dgAltLine { display: none;...
1
by: Harlan Messinger | last post by:
English Wikipedia allows registered users to define custom styles. I created a set of styles inside a @media handheld wrapper to see if I could override the default absolute positionings and floats...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.