473,320 Members | 1,848 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,320 software developers and data experts.

Get applied CSS rules?

Is there any way I can find the CSS rules that were applied to a
particular element? This is distinct from computedStyle - for example,
in Mozilla, I want to find the actual rules that were applied for
font-size, but computedStyle gives me the font-size after weighting it
with the user's text size preference.

Thanks,
Jeremy
Aug 11 '06 #1
1 1957
Jeremy wrote:
Is there any way I can find the CSS rules that were applied to a
particular element? This is distinct from computedStyle - for example,
in Mozilla, I want to find the actual rules that were applied for
font-size, but computedStyle gives me the font-size after weighting it
with the user's text size preference.
<div style="font-size:20px"
onClick="alert(this.style.fontSize)">click</div>
<hr>
<div style="font-size:200%"
onClick="alert(this.style.fontSize)">click</div>
<hr>
<div style="font-size:3em"
onClick="alert(this.style.fontSize)">click</div>
<hr>
<div style="font-size:40pt"
onClick="alert(this.style.fontSize)">click</div>

Hope this helps,

--
Bart

Aug 12 '06 #2

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

Similar topics

0
by: Philippe Poulard | last post by:
A sane document management approach: I manage my documents with a key, composed with some fields of my XML documents. When I have to refer to documents, I use a canonical form of the key so that...
17
by: DanielESFA | last post by:
Hey guys :) This is a bit of a funny one... We're four guys working on the same project, everybody using KDevelop and g++ on Linux. Three of us are using Mandrake, with g++ 3.4.3 and 3.4.1....
0
by: vcp | last post by:
<xml newbie> Hi all, We are considering using XML to specify rules, policies. This XML file will be used to generate source code in either managed C++ or C#, which will be implemention of API...
6
by: Ian Gordon | last post by:
Hello, Here's a weird one that I can't quite put my finger on, but wonder if anyone may enlighten me? My ASP.NET site is all working functionally on site, but for some reason, none of the...
0
by: natty2006 | last post by:
Submission Deadline extended: 13 November 2006 ************************************************************* IADIS INTERNATIONAL CONFERENCE APPLIED COMPUTING 2007 February 17-20, 2007 -...
1
by: vituko | last post by:
Hello, first I want to appologize, I'm spanish and my inglish is very bad, I hope anybody to understand me. So, I work with xml in an iframe, no xsl and no xhtml. There's no inline styles and I...
6
by: Lighter | last post by:
How to read "The lvalue-to-rvalue, array-to-pointer, and function-to- pointer standard conversionsare not applied to the left expressions"? In 5.18 Comma operator of the C++ standard, there is a...
0
by: tutorialwebs | last post by:
Applied cryptography text books http://www.365x24live.com/Applied%20Cryptography/ewtoc.html http://www.365x24live.com/Applied%20Cryptography/ewtoc.html...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.