One ... aspect of good design is to come up with the money for your site atheme and ... A good settlement of this can be done usinga ... Using ... is not ... In fact it makes thetask of desig
One important aspect of fine design is to give your site a
theme and coherence. A great treaty of this can be finished using
a stylesheet.
Using stylesheets is not difficult. In fact it makes the
task of designing a website that much easier. However many
new designers don't use them.
But since dispelling some of the confusion, let us look at
the advantages of using CSS - cascading style sheets.
ADVANTAGES
1) You can use an outdoor stylesheet to control the look
and tune of your total website, such as the font
size, style, and color, the background image, the
background color, etc... by varying a single file. You
don't dependence to condense every page.
2) Linking to a stylesheet reduces the size of your web
pages and gives you much cleaner HTML code because you
don't compulsion to specify the font, color, or "style" of every
element on your page.
3) Web pages are displayed differently upon different
browsers and platforms. For example a 10pt font looks fine
on a PC but becomes too little on a Mac. You can use a
browser-detection script in the header of your pages which
will associate to a oscillate stylesheet depending upon which
browser is beast used.
The on fire of this article assumes you have a basic
understanding of HTML tags, the code astern your web pages.
If not you can get our simple HTML tutorial at -
http://www.thewebseye.com/HTML.htm.
Now using stylesheets is actually easier than HTML. The
main cause of confusion is that you can either associate your
web pages to an uncovered stylesheet, or you can complement the
style sheet in the header of individual web pages inside
STYLE tags. Web design software does not always create this
clear unless you gate the support pages in detail. Forget your
web design software for a moment, because it is easier to
understand stylesheets if you tolerate a see under the
surface.
An uncovered style sheet can be as easy and powerful as
this:
BODY background-image: url(images/mybackground.gif);
background-color: #FFFFFF;
P FONT-FAMILY: Verdana, Helvetica, sans-serif; FONT-SIZE:
12pt; COLOR: navy
You copy and paste the above in Notepad, Wordpad or other
text or HTML editor, and save it as "mystyle.css". Put this
stylesheet in the same calendar as your HTML files. Note
the ".css" further explanation is important. next you associate your web
pages to this stylesheet by putting the gone code in
the HEAD place of your pages.
< colleague rel="STYLESHEET" type="text/css" href="mystyle.css" >
It is now easy to change the background image or color of
your site by conveniently changing the variables in the
stylesheet. You can plus regulate how the text in your in
your website looks anything in "P" tags upon your web pages
takes on the "P" attributes specified in the stylesheet.
The above will create your pages display Verdana text (and
you manage to pay for the different of Helvetica and sans-serif in case
your visitor's computer does not preserve the first choice)
which is 12 pt and navy.
The next source of confusion is the use of the CLASS
attribute. But this is moreover real easy and agreed powerful. It
is best explained by count option style to our stylesheet
explained above.
P.redtext FONT-FAMILY: Verdana, Helvetica, sans-serif;
FONT-SIZE: 12pt; COLOR: red
Now what this allows you to realize is create certain blocks of
text red. In your web pages, instead of a simple "P"
tag almost your text, you would add
class="redtext" to the "P" tag and the text inside the tags would be
red.
You can have any number of classes and ration classes not
only to P tags, but moreover to your table data TD, your
links "A" and any tag contained in the "BODY" of your web
pages. And by usefully changing the stylesheet you can change
the see of your gather together site. Are you start to see the
power of using style?
It is however important to pull off Netscape and Internet
Explorer treaty once stylesheets differently and Netscape
does not maintain them as sufficiently as IE. Netscape basically
takes the inheritance a step too far. The by yourself pretentiousness to find
out what goes and what doesn't is by events and error,
however there are a couple of resources which will incite you
a long exaggeration subsequently understanding more nearly stylesheets. We
have listed contacts to these resources at
http://www.thewebseye.com/stylesheets.htm.
With easy stylesheets you should have no misfortune and they
will in point of fact incite to create determined your site keeps a certain
amount of uniformity and cohesion.
No comments:
Post a Comment