More advice for the full screen mode.
I list below all topic groups, which I have done according to subjects, which they handle. You can return to this topic group by using this menu and the link Table of topic groups on the top of the each page.
Table of topic groupsFront page of CSS-guideGeneral info - Advice pages > Frequently asked questions (FAQ)

Frequently asked questions (FAQ)



I collect to this page some questions and answers, which concerns primary CSS. I try to answer also to HTML, XHTML and XML related matters. Some questions are not asked frequently, but it is common habit to use a FAQ-page. I put also some imaginary questions, which I belive many people might ask for me. From the page 12. What other special features CSS has[S] you can look at to what questions you can't get answers from this site. I made to this page a one kind of continuation page Used CSS in my sites[S], where I tell, what CSS-features I have used in my sites. I hope, that they could give good hints.

If you want answers to questions, which concerns only this site read following pages:

Questions and answers

  1. Why much less than MS IE used Netscape/ Mozilla and Opera browsers should take account?
    Web-pages should work in all platforms. Into many platforms it is not possible to install MS IE. For example in the Linux platform can be used Opera and Mozilla based browsers and some other browsers. Nokia 9xxx Communicator and many other mobile devices use the Symbian OS (EPOC) platform. For that platform Opera is the only available modern CSS2 supporting browser. In overall the Internet is not intended to be like a private property of some company but instead of as wide as possible open web community (I handle in this matter related points of views closer in an extra page[S]). I give hints to detect different browser in an extra page[S].
  2. How CSS can take off and put on again?
    The usage of style sheets is controlled through preferences of browsers. I have explained the setting of user style sheets in the extra page What are user style sheets[S]. That page gives hints also to change other preferences.
  3. Does CSS increase the download times of pages?
    Especially if font definitions are used pages, which use CSS are usually rendered faster than pages, which don't use it (read basics of CSS from the page What are basic structures of HTML and XML documents[S]).
  4. Why CSS has different linking systems?
    For CSS has been created two basic ways to link style sheets (<style type="text/css" media="all">@import "all.css";</style> and <link rel="stylesheet" type="text/css" media="print" href="print.css">). In principle the usage of the LINK element gives the possibility to change style sheets (<link rel="stylesheet alternate" type="text/css" media="screen" href="alternate.css">). I explain the basic usage of style sheets in the page 2. How to put CSS into Web pages[S] and the functionality of the usage of so-called media types in the page 6. [S]. Look at also the extra page How to design CSS files[S].
  5. How it is possible to create own CSS for different screen resolutions or different browsers?
    Apply passing methods of Netscape 4.x series[S] according to your needs.
  6. Which browsers follow best the CSS2 specification?
    Opera 5.x+, MS IE 5.0 for Mac, MS IE 6.0 for Windows, Netscape 6.1+ and Mozilla 0.9+ follow it quite strictly. In my mind Opera browser have the widest CSS2 implementation (argumentation[S]).
  7. Why Netscape 4.x and MS IE 5.x Windows show pages differently?
    Neither of them goes according to the CSS2 specification, but Netscape 4.x works very incorrectly. Use browsers, which I have mentioned in the previous answer as comparison browsers.
  8. How sites could get to work well in most used browsers in Mac and PC computers?
    This is not possible, but you can find some advice from following pages in order to get relative good working pages in various browsers:
    1. 3. What are color, units and keywords in CSS[S] - handles problems concerning units. Especially font sizes xx-small are very problematic to use.
    2. 8. How to set CSS for backgrounds and borders[S] - this page handles border, background and dimension problems. Many browsers handle width and height properties incorrectly, but the situation is not equal concerning tables[S] and other elements. Set the dimensions of elements so, that they work well in browsers, which follow the CSS2 specification.
    3. Netscape 4.x problems[S]. It is possible to support Netscape 4.x series only partial. It is reasonable to make for it own (compared to other browsers limited) CSS-files.
    4. Define main CSS-file for modern browsers (for example basicScreen) such that it fits relative well for all modern browsers without JavaScript enabled. Make then custom CSS-files for individual browsers (look at as model the source code of this page).
  9. I don't want to links and anchors to be underlined, but Netscape 4.x underline them. What I should do?
    You can find the answer from the extra page Netscape 4.x problems[S].
  10. Why Opera 4.x+ and Netscape 6.x+ don't render the background color to the whole image, when the :hover pseudo-class is used?
    You can find the answer and the solution to this problem from the page How to set CSS for anchors and links[S]. There is also other possible questions, which concerns :hover, for example following:
    Why Opera crop the text at the :hover state if the text size is bigger as it is in the normal state?
    Why Opera doesn't (presumably) allow dynamic changes of the display property with a:hover?
    I answer also these question in the same page.
  11. Is it necessary to use always units?
    Properties, which can have units, must use them except the value 0 and the line-height property. Look at also the page 3. What are color, units and keywords in CSS[S]
  12. How I can center elements vertically and horizontally?
    I handle thins matter in the page 4[S].
  13. Why Opera renders tables sometimes worse than MS IE?
    1. If some table works really bad in Opera, the HTML-encoding is in most cases very invalid. MS IE renders relative bad encoded tables as if they are error free, but Opera doesn't. Thinking about the future development of the Internet, Opera works well, if visitors just give feedback about bad encodings to the authors.
    2. If differences are relative small, the author has presumably used such HTML features (for example proprietary attributes), which Opera doesn't support or the author has done the CSS according to the buggy behavior of MS IE ( (look at also a quotation in an extra page[S]).
  14. Why tables, which don't have margin, border and padding properties have two pixel cell spacing? Is there anyway i can get a table border that equals one pixel consistent in all browsers?
    Browsers use as the default in HTML the cell spacing value "2". Some browsers need to the element TABLE the specifier cellspacing="0" to get it off. This helps also defining one pixel wide borders to table cells (read more about these matters from the page 10. How to set CSS for table elements[S]).
  15. Why text type properties don't work in tables?
    Many browsers have a bug concerning the on bug in so-called inheritance[S]. Look at advice from the page 10. How to set CSS for table elements[S].
  16. How it is possible to define borders and the background color so, that they work equally in most CSS-supporting browsers, when the table should use the full horizontal space?
    Don't set these properties directly to the table but set instead a DIV element around the table and to that element border and background-color properties. The element DIV takes as default all available horizontal space but the element TABLE only the necessary space. If you to try to define with CSS the width of table so, that it takes the full width, it cause that browsers render the table differently (look at a previous question). Set the width of the table below the width of the surrounding DIV element.
  17. What are alternatives to tables?
    The basic structure can be build upon DIV elements. I handle alternatives in the page 11. Visual formatting model[S].
  18. How it is possible to get "hidden text", when someone, who has a browser, which doesn't support CSS get the text but in other situation it is invisible?
    This matter is explained in the page 11. How to put CSS into Web pages[S] in the section Display.
  19. How it is possible to get pages, which are designed inside a DIV element to be centered?
    In principle this should be possible by setting div {margin:auto}, it works correctly only quite new browsers (I handle this problem in the pages 8. How to set CSS for backgrounds and borders[S] and 11. Visual formatting model[S]). In order to get pages centered in most browsers, it is necessary to set align="center" and to child-elements necessary text-align values. If necessary use an additional DIV elements.
  20. What is the difference between class="" and id=""?
    You can find the answer from the page 4. What are selectors, classes and id-attributes[S] (look at especially the section, which handles class and id selectors).
  21. What are phrasal elements?
    Look at the answer from the extra page What are semantics of (X)HTML elements[S]. I refer in that page also to a certain kind of opposite to them, so-called presentational elements.
  22. Why Opera renders horizontal scroll bars to documents, but MS IE doesn't render them?
    1. If the problem is only by using frames, the most likely reason is that Opera handles nested framesets differently (I explain this matter in a special page[S]).
    2. The second possibility is common problems concerning the width property, which I have handed in a sub part of another question.
    3. Third margins for the BODY element has bee defined with non-standard attributes (leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"), which Opera doesn't understand. Opera needs corresponding CSS (body {margin:0}).
    4. In addition I have found that if the CSS is very complex, the page might need to reload before Opera renders it correctly.
  23. Why browsers left in short pages space to the right even if margin and padding properties have set to zero to elements BODY and HTML?
    Browsers left in HTML-pages default margin, so-called browser offset, if it doesn't have set off. Commonly that can be eliminated with CSS, but some browsers needs proprietary attributes for the element BODY (look at the previous question). But these don't take off the space, which browsers reserve for the possible vertical scroll bar. The empty space can be eliminated only by using frames, which don't allow scrolling.
  24. MS IE creates unnecessary horizontal scroll bars, what I should do?
    In most cases helps, if you define a document wide DIV element and for it for example width:99%. Define to large image dimensions in order that they would be rendered in all circumstances.
  25. Is it reasonable to use today XHTML?
    It can be used, but following matters must remember:
    1. In the terminations of so-called empty elements must be a space (for example <img src="..." alt="..." />, you should not write <img src="..." alt="..."/>).
    2. The XML-declaration (<?xml version="1.0"?> should not be used in page, which have other file extension than *.html, *.htm or *.shtml. By using other file extension with the XML-declaration, browsers might interpret the document as an ordinary XML-document, when the page doesn't work as expected.
    3. The CSS-implementation of some browsers is DTD-dependent. If you don't have used DTD or it has been <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">, the CSS-implementation changes in MS IE 6.0 for Windows, MS IE 5.0 for Mac and new Netscape/ Mozilla browsers. The changing point in new Netscape/ Mozilla is however different. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> doesn't cause the change in MS IE browsers, but in new Netscape/ Mozilla does.
  26. Why browsers implement borders for form control elements differently?
    The basic idea of CSS is to able to handle any presentational feature of elements. At this point of view CSS2 should be able to redefine borders of form control element. All new browsers can do this for example to <TABLE border="50">. Form control elements have however features, which CSS2 can't be able to apply. There is not for example for <INPUT type="radio" any standard, how to implement CSS. It is understandable that implementations are different. Look at more about this subject from the page 8. Backgrounds and borders[S].
  27. Why Opera 4.x+ and Netscape 6.x don't read DHTML (CSS + JavaScript/EcmaScript) scripts?
    They are created in many times with non-standard ways. These browsers don't support proprietary DHTML encodings of Netscape 4.x and MS IE 4.x browsers. I made an extra page[S], where I teach how to design dynamic menus, which work both in new Opera/ Netscape browsers and MS IE 4.x for Windows/ Netscape 4.x browsers. Menus work also in MS IE 5.x for Mac browsers, which support both the proprietary encoding of Windows versions and standard encoding.
  28. Why Netscape 6.x increases height/width values of low or narrow filling cells?
    I have found that it somewhat expects that each cells have some text. In order to get low cells define also line-height and font-size properties. What about the width problems I have found that the browsers might need very accurate definitions of table elements with CSS for tables. I have an example about this kind of situation in the page, which handles dynamic menus[S].
  29. Why the printing doesn't turn into landscape?
    Only Opera 4.x+ supports in theory at this moment landscape printing. The supporting is however "virtual" because it can render in the print preview pages as landscape, but it doesn't change the printing orientation of the printer itself. The visitor must change that. Printing-related special CSS features are supported quite poor in MS IE browsers and Mozilla Gecko browsers don't support them at all. MS IE might support with some proprietary encoding landscape printing and some other printing-related features. I handle printing-related features in the page 6. How to set CSS for texts and different media types[S].
  30. Why new Netscape and Mozilla browsers render list elements differently as other browsers?
    Browsers try to implement list-style-position according to the CSS2 specification. In the other hand they have different default values for list elements. Look at from the page 9[S] browser-specific notes.
  31. Why new Netscape and Mozilla browsers add with certain document types additional space around images?
    The browser tries to follow the CSS2 specification implementing the vertical-align property. Look at from the page 8[S] a browser-specific note, which concerns inline elements.

Links to other FAQ pages