The fourth day : of the style sheet called

Standard design with a web site, the main method is the use of transitional XHTML + CSS, css style sheet is essential. This requires that all Web designers must be familiar with CSS, if you did not previously used, now to start learning it. To create a consistent standard web site, do not know CSS is not a beautiful page design.

In fact, all performance areas will need to use CSS to achieve. We previously have used to locate and use the table layout, is to use DIV to position and layout. Changes in the way of thinking this is a beginning, some are not used. Oh, there will be resistance to any change, in order to enjoy the standard to give the “benefit” and give up some of the old traditional approach is worthwhile.

External style sheet called

In the past, we usually use 2 methods to use the style sheet:
Page built law: that is the style sheet directly write the code in the page head area. Like this:

<style type=”text/css”> <! – body {background: white; color: black;} -> </ style>

External call method: a style sheet written in a separate. Css file, and then head area of the page similar to the following code with the call.

<link rel=”stylesheet” rev=”stylesheet” href=”css/style.css” type=”text/css” media=”all” />

In line with standard web design, we use an external call law, the benefits of self-evident, you can not modify the page, change only. Css file and change the page style. If all the pages are called with a style sheet file, then change a style sheet file, all files can change the style.

Two-table method call style sheet

View some of the standard site of the original code, you may see, call the style sheet in the following two areas:

<link rel=”stylesheet” rev=”stylesheet” href=”css/style.css” type=”text/css” media=”all” /> <style type=”text/css” media=”all”> @ import url (css/style01.css); </ style>

Why write twice?

In fact generally associated with external calls (that is, the first sentence) is sufficient. I’m using dual table is only a sample call. One of the “@ import” command is used to enter the style sheet. The “@ import” command in netscape 4.0 version of the browser is invalid. That is, if you want some effect in netscape 4.0 browser, hidden, in the 4.0 or other browsers also show, you can use “@ import” command method call style sheet.

===============================================================

Related posts:

  1. The first day : the choice of what kind of DOCTYPE Preface Hello everybody! This series of articles is written W3CN...
  2. The Seventh day : Getting Started with CSS XHTML coding standards in understanding, we will be CSS layout. First...
  3. The third Day : definition language code The third step is to define your language code: <meta...
  4. The fifth day Setting the head and other areas These techniques mainly about meta tags set, and in fact...
  5. What are the benefits by Using WEB standard construction site? Most of us have a profound experience, whenever the major...

Related posts brought to you by Yet Another Related Posts Plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>