Questions tagged [stylesheet]

DO NOT USE THIS TAG. Use [css] for CSS related issues, [xslt] for XSLT related issues, and [qtstylesheets] for QT Stylesheets issues, instead.

2951 questions
663
votes
23 answers

How to use HTML to print header and footer on every printed page of a document?

Is it possible to print HTML pages with custom headers and footers on each printed page? I'd like to add the word "UNCLASSIFIED" in Red, Arial, size 16pt to the top and bottom of every printed page, regardless of the content. To clarify, if the…
ben
386
votes
17 answers

How to dynamically create CSS class in JavaScript and apply?

I need to create a CSS stylesheet class dynamically in JavaScript and assign it to some HTML elements like - div, table, span, tr, etc and to some controls like asp:Textbox, Dropdownlist and datalist. Is it possible? It would be nice with a sample.
Himadri
  • 8,600
  • 15
  • 47
  • 70
291
votes
18 answers

Single huge .css file vs. multiple smaller specific .css files?

Is there any advantage to having a single monster .css file that contains style elements that will be used on almost every page? I'm thinking that for ease of management, I'd like to pull out different types of CSS into a few files, and include…
Nate
  • 30,286
  • 23
  • 113
  • 184
183
votes
19 answers

Can you use if/else conditions in CSS?

I would like to use conditions in my CSS. The idea is that I have a variable that I replace when the site is run to generate the right style-sheet. I want it so that according to this variable the style-sheet changes! It looks like: [if {var} eq 2…
Haim Evgi
  • 123,187
  • 45
  • 217
  • 223
171
votes
11 answers

In which order do CSS stylesheets override?

In an HTML header, I've got this: Title styles.css is my page-specific sheet. master.css is a sheet I use…
ian5v
  • 2,078
  • 2
  • 18
  • 20
150
votes
7 answers

Internet Explorer's CSS rules limits

I've read conflicting information regarding Internet Explorer's silly CSS limits. I am (think I am) understanding that you can only have 31 In the body
I'm looking for straight javascript without the use of…
stan
  • 1,172
  • 2
  • 9
  • 8
82
votes
10 answers

CSS position:fixed inside a positioned element

I have a positioned div whose content can be too long so scrollbars appear (overflow:auto set). It functions as a dialog box in an ajax app. I want to fix a close button on it's right top corner so when the user scrolls the div it won't scroll…
Calmarius
  • 18,570
  • 18
  • 110
  • 157
81
votes
11 answers

Fix: The Global element 'configuration' has already been declared

I used the second solution of How to resolve "Could not find schema information for the element/attribute "? I.e. created a XSD with the button to create a scheme. I changed the stylesheet in app.config to app.xsd but now I get the warning: The…
Michel Keijzers
  • 15,025
  • 28
  • 93
  • 119
77
votes
16 answers

Stylesheet not updating when I refresh my site

I am creating a website, but when I made changes to the stylesheet on my site, and I refreshed the site, none of the changes were there. I tried to use the view source tool to check the stylesheet.css and it isn’t updated either. But when I go to…
Mihad Aiko
  • 909
  • 2
  • 11
  • 12
1
2 3
99 100