stylesheets

Why is there the need for browser resets?

Okay that's probably not the best title, I know why we need browser resets: because browsers have different defaults set. My question that was too long to put into a title is: If everyone needs to use a reset stylesheet 90% of the time, why do browsers need to set default styles? We're just going to remove them anyways, right? ...

Resetting the style on elements with inherited style

I have one <div> and I don't wish to inherit any formatting from any other stylesheets - I want to start fresh with this <div>. How can I do it? ...

How can I "reset" styles for a given HTML element?

I am working on an embeddable javascript which inserts HTML elements onto unknown pages. I have no control of the stylesheets of the pages I'll be inserting HTML into. The problem is that the HTML I insert will mistakenly stylized by the page, and I want to prevent that. What's the least verbose and/or resource intensive to go about ...

Adding !important within a dynamically written stylesheet for Internet Explorer

I have been experimenting with using javascript to dynamically write stylesheets. In Firefox, one can use the setProperty method on the style for the cssRules of the styleSheets, like... document.styleSheets[0].cssRules[0].style .setProperty(propertyName, propertyValue, 'important'); ...to set the !important flag on the style. I hav...

Print stylesheet precedence

Hi, I have inherited some legacy code which generates a ton of inline styles. The client requires a print stylesheet which i am not sure will override the inline styles. Assume not. Would there be a way with jQuery to rip out all the inline styles whilst preserving the HTML structure prior to the print CSS being applied? ...

Get unrecognized styles from stylesheet in JS

How can I get the actual text of a stylesheet using JS? The cssRules property only returns those rules that it recognizes. eg. I would like to change -webkit-border-radius to -moz-border-radius. Or do some JS wizardry to any element who's style contains myTrigger:true; (Do NOT lecture me on principal.) Cycling through document.styles...

The text cannot display in Print PreView

Dear all, I have a html page as below : <html> <head> <title>Print</title> <style type="text/css"> A { font-weight: normal; font-size: 10pt; text-decoration: none; } </style> <link rel="stylesheet" type="text/css" hr...

using php to populate textarea with css file

Hi I'm sure this is possible in php. I have several css files located in a folder on my server. I wish to list these files in a drop down menu located on a php page. When the user selects one of these files in the dropdown, a textarea on the same page is populated with the source code of that css file. Struggling with this one, any he...

XSLT Stylesheet switcher

Is there a way to switch a CSS stylesheet using XSLT? We are trying to do this without Javascript or include different files based on what CSS Stylesheet is used. Example: XSLT for normal view. Click a link and switches the stylesheet to view a Text Only view for accessibility and screen readers to use. At the same time getting rid o...

Camping's URL() doesn't give me "site root" as expected?

Due to circumstances beyond my control, my production Camping site appears at mysite.example.com/mysite. I'm pretty sure this is a common Apache / Passenger configuration issue, and I'm not interested in how to fix it right now because the server is out of my control. Suffice to say, the controller for "/" points there and I can't chan...

Looking out for a good Visual XSLT Editor tool.

Hello Am looking out for a good Visual stylesheet designer through which i can export my report designer directly into XSL. I should be also able to read/import the XSL to get back the designer. Anyone having an idea of such tools. Presently i am checking out the Visual Stylesheet designer from Altova. Before freezing onto it i want ...

position fixed images within div (pins on map)

I have a "map" div with the css rules height: 400px; width: 800px; background: url(map.png). This div has a background image of a world map. I have some images that act as "pins" that I want to place on the map in specific areas. What CSS properties would I give the image to be able to, for example, place them within the "map" div by ...

Linking to External Stylesheets with HTTP:// or local path

What are the pros and cons of each? Is there a difference? CSS Stylesheets in HTML. ...

What are some client-side tricks to get around IE7's absurd 32-stylesheet limit?

I just worked out, by trial-and-error, that IE 7 has an upper limit of 32 stylesheet includes (i.e. tags). I'm working on the front-end of a very large website, in which we wish to break our CSS into as many separate files as we wish, since this makes developing and debugging much easier. Performance isn't a concern, as we do compress...

Javascript style isnt compatible with IE

<div align="center"> <span class="style19"> <script type="text/javascript" src="http://ebayfeedback.easystorehosting.com/esh/ebayfeedback/feedback.php?eBayId=Mizauctions"&gt;&lt;/script&gt; </span></div> I am trying to style this string of javascript so that the text it generates is about 10px. It works exactly how ...