Friday, 21 September 2007

CSS study ------> part 2 ------> W3School

This is a very helpful place for you to study CSS. It has almost everything you need for CSS. And examples are very useful.

In your HTML page, you need to have style.css imported, which will help you to format your page properly, like
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>

This tells the browser to look for the style sheet for the web pages.
Generally the style sheet starts with some basic format definitions of the page,like h1, h2, h3, p and a etc.

Saturday, 15 September 2007

CSS study ------> part 1 ------> warm up

I just finished a Java-based tool for radiation beam modelling. Later I will put some GUI codes in this blog.


Recently I am trying to build website by myself. I know some simple CSS for web coding, but to make a beautiful website I have to study it again.

From W3C, you can have some idea about it.

There is class in style sheet, but it is not the class as in C++/Java. It starts with '.' (dot) and follows the name of the class, for example,

p.right {text-align: right}
p.center {text-align: center}

Used in HTML,
< p class="right" >
This paragraph will be right-aligned.
</p>
<p class="center">
This paragraph will be center-aligned.
</p>

If a class has no tag name, it could be used by any tag. If '#' starts before a name, it is an id selector and used with id in HTML.