fix logic
[personal-kdelibs.git] / khtml / css / html4.css
blob115a5e6bac48f1f32dd25133d804876a216b3f2a
1 /*
2 * The default style sheet used by khtml to render HTML pages
3 * Copyright 2000-2003 Lars Knoll (knoll@kde.org)
5 * Konqueror/khtml relies on the existence of this style sheet for
6 * rendering. Do not remove or modify this file unless you know
7 * what you are doing.
9 * KHTML_STYLE_VERSION: 1
12 @namespace "http://www.w3.org/1999/xhtml";
14 html {
15 display: block;
16 color: -khtml-text;
20 * head and it's children all have display=none
23 head {
24 display: none;
27 meta {
28 display: none;
31 title {
32 display: none;
35 link {
36 display: none;
39 style {
40 display: none;
43 script {
44 display: none;
48 * generic block level elements
51 @media print {
52 body {
53 display: block;
54 margin: 0px;
58 @media screen {
59 body {
60 display: block;
61 margin: 10px;
65 p {
66 display: block;
67 margin: 1.0__qem 0px;
70 div {
71 display: block;
74 /* to force a block level context for some cases (broken HTML) */
76 layer {
77 display: block;
80 address {
81 display: block;
84 blockquote {
85 display: block;
86 margin: 1__qem 40px 1em 40px;
89 q {
90 display: inline;
93 q:before {
94 content: open-quote;
97 q:after {
98 content: close-quote;
101 center {
102 display: block;
103 /* special centering to be able to emulate the html4/netscape behavior */
104 text-align: -khtml-center;
107 hr {
108 display: block;
109 margin: 12px auto;
110 border-style: inset;
111 border-width: 1px;
112 -khtml-flow-mode: -khtml-around-floats
115 map {
116 display: inline;
120 * heading elements
121 * margin values rely on font-sizes ratio defined in css-2.1 15.7
122 * (cf. cssstyleselector for absolute font-sizes computation)
123 * we have an 1.1/font-ratio margin
126 h1 {
127 display: block;
128 font-size: xx-large;
129 margin: .55__qem 0 .55em 0;
130 font-weight: bolder;
133 h2 {
134 display: block;
135 font-size: x-large;
136 margin: .73__qem 0 .73em 0;
137 font-weight: bolder;
140 h3 {
141 display: block;
142 font-size: large;
143 margin: 0.92__qem 0 0.92em 0;
144 font-weight: bolder;
147 h4 {
148 display: block;
149 font-size: medium;
150 margin: 1.1__qem 0 1.1em 0;
151 font-weight: bolder;
154 h5 {
155 display: block;
156 font-size: small;
157 margin: 1.24__qem 0 1.24em 0;
158 font-weight: bolder;
161 h6 {
162 display: block;
163 font-size: xx-small;
164 margin: 1.83__qem 0 1.83em 0;
165 font-weight: bolder;
169 * tables
172 table {
173 display: table;
174 border-collapse: separate;
175 border-spacing: 2px;
176 -khtml-flow-mode: -khtml-around-floats;
177 box-sizing: border-box;
180 thead {
181 display: table-header-group;
182 border-color: inherit;
183 vertical-align: middle;
186 tbody {
187 display: table-row-group;
188 border-color: inherit;
189 vertical-align: middle;
192 tfoot {
193 display: table-footer-group;
194 border-color: inherit;
195 vertical-align: middle;
198 col {
199 display: table-column;
202 colgroup {
203 display: table-column-group;
206 tr {
207 display: table-row;
208 vertical-align: inherit;
209 border-color: inherit;
212 td, th {
213 display: table-cell;
214 vertical-align: inherit;
217 th {
218 font-weight: bolder;
221 caption {
222 display: table-caption;
223 text-align: -khtml-center;
227 * lists
230 ul, menu, dir {
231 display: block;
232 list-style-type: disc;
233 margin: 1__qem 0 1em 0;
234 -khtml-padding-start: 40px
237 ol {
238 display: block;
239 list-style-type: decimal;
240 margin: 1__qem 0 1em 0;
241 -khtml-padding-start: 40px
244 li {
245 display: list-item;
248 ul ul ul, ul ol ul, ul menu ul, ul dir ul,
249 ol ul ul, ol ol ul, ol menu ul, ol dir ul,
250 menu ul ul, menu ol ul, menu menu ul, menu dir ul,
251 dir ul ul, dir ol ul, dir menu ul, dir dir ul,
252 ul ul menu, ul ol menu, ul menu menu, ul dir menu,
253 ol ul menu, ol ol menu, ol menu menu, ol dir menu,
254 menu ul menu, menu ol menu, menu menu menu, menu dir menu,
255 dir ul menu, dir ol menu, dir menu menu, dir dir menu,
256 ul ul dir, ul ol dir, ul menu dir, ul dir dir,
257 ol ul dir, ol ol dir, ol menu dir, ol dir dir,
258 menu ul dir, menu ol dir, menu menu dir, menu dir dir,
259 dir ul dir, dir ol dir, dir menu dir, dir dir dir
261 list-style-type: square;
264 ul ul, ul menu, ul dir,
265 ol ul, ol menu, ol dir,
266 menu ul, menu menu, menu dir,
267 dir ul, dir menu, dir dir
269 list-style-type: circle;
272 dd {
273 display: block;
276 dl > dd {
277 -khtml-margin-start: 40px;
280 dl {
281 display: block;
282 margin: 1__qem 0 1em 0;
285 dt {
286 display: block;
289 ol ul, ol menu, ol dir, ol ol,
290 ul ul, ul menu, ul dir, ul ol,
291 menu ul, menu menu, menu dir, menu ol,
292 dir ul, dir menu, dir dir, dir ol
294 margin-top: auto;
295 margin-bottom: auto;
298 li > p {
299 margin-top: auto;
300 /* margin-bottom: auto;*/
303 li > div {
304 margin-top: auto;
305 /* margin-bottom: auto;*/
309 * form elements
312 form {
313 display: block;
314 margin: 0__qem 0 1em 0;
317 legend {
318 display: block;
319 padding-left: 2px;
320 padding-right: 2px;
321 border: none;
322 margin: 0;
325 fieldset {
326 display: block;
327 padding: 0.75em 0.625em;
328 margin: 1.0em 0;
329 border: 2px groove threedface;
330 -khtml-flow-mode: -khtml-around-floats
333 button {
334 display: inline-block;
335 border: 2px outset buttonface;
336 background-color: buttonface;
337 font-size: small;
338 -khtml-background-clip: padding;
339 color: buttontext;
340 padding: 2px 2px 2px 2px;
341 cursor: default;
344 button:enabled:active {
345 border-style: inset;
348 input, textarea {
349 text-align: -khtml-auto;
352 input, textarea, select, button {
353 font-weight: normal;
354 margin: 0__qem;
357 input { color: windowtext;
358 font-family: sans-serif;
359 font-size: small;
360 border: 2px -khtml-native;
361 background-color: window;
364 input[type="hidden"] {
365 display: none;
368 input[type="radio"], input[type="checkbox"] {
369 margin: 0 0.5ex;
370 background-color: window;
371 color: windowtext;
372 -khtml-background-clip: padding;
375 input[type="text"], input[type="password"] {
376 background-color: window;
377 color: windowtext;
378 -khtml-background-clip: padding;
379 cursor: text;
382 input[type="submit"], input[type="reset"], input[type="button"] {
383 background-color: buttonface;
384 -khtml-background-clip: padding;
385 color: buttontext;
388 input[type="file"] {
389 background-color: window;
390 color: windowtext;
393 input[type="image"] {
394 background-color: transparent;
397 isindex { color: windowtext; font-size: small; }
400 option,
401 optgroup,
402 area,
403 param {
404 display: none;
407 select {
408 font-family: sans-serif;
409 font-size: small;
410 color: buttontext;
411 background-color: buttonface;
412 -khtml-background-clip: padding;
415 select[multiple],
416 select[size] {
417 background-color: window;
418 color: windowtext;
421 select[size="0"]:not([multiple]),
422 select[size="1"]:not([multiple]) {
423 background-color: buttonface;
424 color: buttontext;
427 textarea {
428 color: windowtext;
429 background-color: window;
430 -khtml-background-clip: padding;
431 font-family: monospace;
432 border: 2px -khtml-native;
433 cursor: text;
437 * inline elements
441 ins {
442 text-decoration: underline;
445 strong,
447 font-weight: bolder;
451 cite,
453 var,
454 address {
455 font-style: italic;
459 code,
460 kbd,
461 samp {
462 font-family: monospace;
465 pre,
466 listing,
467 xmp,
468 plaintext {
469 display: block;
470 font-family: monospace;
471 white-space: pre;
472 margin: 1__qem 0;
475 big {
476 font-size: larger;
479 small {
480 font-size: smaller;
484 strike,
485 del {
486 text-decoration: line-through;
489 sub {
490 vertical-align: sub;
491 font-size: smaller;
493 sup {
494 vertical-align: super;
495 font-size: smaller;
498 abbr, acronym {
499 font-variant: small-caps;
500 letter-spacing: 0.1em
503 *|:focus { outline: 1px dotted invert }
504 a:link:active { color: red; outline: 1px dotted invert; }
505 a:visited:active { color: red; outline: 1px dotted invert; }
507 /* with the current design it is too expensive to set this default via css
508 :before,:after { white-space: pre-line }
511 /* ### use this to replace renderbr
512 br:before { content: "\n" }
516 /* bidirectionality settings (do not change) */
518 bdo[dir="ltr"] {
519 direction: ltr;
520 unicode-bidi: bidi-override;
523 bdo[dir="rtl"] {
524 direction: rtl;
525 unicode-bidi: bidi-override;
528 *[dir="ltr"] { direction: ltr; unicode-bidi: embed }
529 *[dir="rtl"] { direction: rtl; unicode-bidi: embed }
531 /* elements that are block-level in html4 */
532 /* ### don't support unicode-bidi at the moment
533 address, blockquote, body, dd, div, dl, dt, fieldset,
534 form, frame, frameset, h1, h2, h3, h4, h5, h6, iframe,
535 noscript, noframes, object, ol, p, ul, applet, center,
536 dir, hr, menu, pre, listing, li, table, tr, thead, tbody, tfoot,
537 col, colgroup, td, th, caption
538 { unicode-bidi: embed }
541 /* end bidi settings */
544 * other elements
547 noframes {
548 display: none;
551 frameset {
552 display: block;
555 frame {
556 display: block;
559 nobr {
560 white-space: nowrap;
563 marquee {
564 display: inline-block;
565 overflow: marquee;
568 /* noscript is handled internally, as it depends on the html settings */
570 @media print {
571 h1, h2, h3,
572 h4, h5, h6 { page-break-after: avoid }
573 ul, ol, dl { page-break-before: avoid }