473,661 Members | 2,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2700

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
2383
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
35666
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 hidden in print mode</p>
1
2941
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 happy to hear your advice on a couple of practicalities. 1. media="all" required? In the <head> of my pages, I have the following: <link rel="stylesheet" href="style.css" type="text/css"></link>
1
1431
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 lines of code in a very simple newsletter web page. The styles for the "screen" render flawlessly in the browser however, when I do a print-preview or even print, the styles for "print" do not render at all.
1
4345
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 specifying external style sheets in link using combinations of rel and using or not using the title attribute. I think I sort of understand rel="alternate stylesheet". It seems to be able to act something like the media="print" or media="handheld" or...
6
1717
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" type="text/css" href="layout.css" /> Thanks,
5
1876
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 onmouseover="this.style.color='#000000'" style="FONT-SIZE: 12pt; COLOR: #000000; FONT-FAMILY: Arial, Helvetica; TEXT-DECORATION: underline;" onmouseout="this.style.color='#000000' TEXT-DECORATION: none;" href="#">Search</A>
1
1721
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; visibility: hidden; }
1
2512
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 of the major page elements in IE on my Sony Treo with Windows Mobile 5. Without the custom CSS, on both the regular computer and the handheld, the content's beginning is offset from the top and left, and on the handheld it only takes up a...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8856
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8762
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.