DO NOT USE THIS TAG. Use [css] for CSS related issues and [xslt] for XSLT related issues instead.
Questions tagged [stylesheet]
3071 questions
572
votes
20 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
448
votes
16 answers
How can I make a TextArea 100% width without overflowing when padding is present in CSS?
I have the following CSS and HTML snippet being rendered.
textarea
{
border:1px solid #999999;
width:100%;
margin:5px 0;
padding:3px;
}
330
votes
16 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.
![](../../users/profiles/173655.webp)
Himadri
- 7,624
- 14
- 45
- 69
276
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…
![](../../users/profiles/86860.webp)
Nate
- 28,586
- 21
- 107
- 177
200
votes
6 answers
Is type="text/css" necessary in a tag?
I was wondering whether or not it is necessary to use over . The rel="stylesheet" marks the information that it is a stylesheet - so text/css doesn't actually add…
![](../../users/profiles/514749.webp)
pimvdb
- 141,012
- 68
- 291
- 345
168
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…
![](../../users/profiles/1234621.webp)
ian5v
- 1,994
- 2
- 16
- 20
151
votes
6 answers
Margin while printing html page
I am using a separate style-sheet for printing. Is it possible to set right and left margin in the style-sheet which set the print margin (i.e. margin on paper).
Thanks.
![](../../users/profiles/165778.webp)
kobra
- 4,453
- 9
- 29
- 32
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