Quick intro to reading stylesheets

Carl discovers the world

  • RSS Feed
  • Login
  • Contact
Ning Themes
Skins 4 Ning, CSS tips, PHP hacks, howto's and theme doc's
Keyword Elite
I use Keyword Elite to find profitable
niches for my online business
Serendipity Directory
Add your site to the Serendipity
Users Directory
Welcome
Herzlich Willkommen


Hi, Welcome to my site, please bookmark me, and feel free to comment on my posts
  • Home
  • About
  • Serendipity
  • Blogger
  • Wordpress
 

Wednesday, April 19. 2006

Quick intro to reading stylesheets

Select language: German, English
If you're a blogger or webmaster its fairly certain you'll need to edit stylesheets at some point.

If you're editing an html template, or perhaps a Wordpress or Serendipity theme, you'll be looking for a file that has a .css extension, in Serendipity and Wordpress you're looking for style.css

In many stylesheets the first line you see might begin '/*', for example,

/* Theme by Carl */

which tells you this is a comment and isn't used by your browser. Comments are handy for making notes in stylesheets and are never seen on your webpage.
The actual styles look a little like this;

p {
font-size: 0.9em;
line-height: 1.2em;
}

Take moment to have a look at a few of the styles in your stylesheet just to confirm they follow this pattern.

As you look through your stylesheet you may notice styles that begin with a period or hash,

#contentdiv {}
.biggerfont {}

Any style that has a hash sign is block level, whereas styles with a period are inline. The simplest explanation I've found to understand what this means is that block level items will always be displayed on a new line, while inline items are displayed in the current line or paragraph.

Both of these styles are different from the first example, which had no hash or period. Other examples of styles which are written without a preceding hash or period are body, a, H1, img etc, which you would probably realise are standard HTML tags, but with some styling applied to them.

So, armed with this knowledge, you should be better prepared to read your stylesheet. In a followup article I plan to discuss a basic tableless design and the styles that are needed to make it work.
If you enjoyed this post, make sure you subscribe to my RSS feed.
Posted by Carl in Basic html/css at 16:49   Comments (0)
Defined tags for this entry: bloggingtechnorati, Templatestechnorati, Themestechnorati
Related entries by tags:
Pixabella04 for Wordpress
SEO using Social Bookmarking Type Sites
Add This Bookmark and Share Widget Code for Serendipity Templates


Trackbacks
Trackback specific URI for this entry

No Trackbacks

Comments

    No comments

Add Comment

Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 
 
Submitted comments will be subject to moderation before being displayed.
 
 

Categories

  • Blogger
  • Blogger Templates
  • Carl's Journal
  • Writing Resources
  • Christmas
  • Humanity
  • Italian
  • Ning Templates
  • Palm z22
  • Science/Nature
  • Technology
  • Screencasting
  • SEO, Traffic
  • Serendipity Blog
  • Basic html/css
  • Download Themes
  • Theming Serendipity
  • Using Serendipity
  • Small Business
  • Spain
  • Spanish
  • Travel
  • Wordpress
  • Xampp WebServer

All categories




U COMMENT
I FOLLOW






My Feedburner Feed
Subscribe to my Feedburner

© 2005-7 Carl Galloway.Template by Carl, artwork by Pixabella. Valid XHTML, CSS