|
|||||
|
This is tutorial/guide mainly for people who have minimal experience with CSS (Cascading Style Sheets) and want to learn a bit out about it. CSS is a stylesheet language that formats the presentation of a document written in a markup language (e.g. HTML, XHTML, XML). CSS has a number of advantages one of the main ones being the presentation of websites can be held in one place, therefore making it really simple to update webpages. Style sheets make sites load faster and doesn't use require much bandwith. CSS specifications are maintained by W3C (World Wide Web Consortium).
Adding stylesheets within the HTML file: Quote:
- the Selector (example: 'body') : specifies which part of the document will be affected by the rule - the Property (example: 'color' and 'background-color') : specifies what aspect of the layout is being set - the Value (example: 'white' and '#000000'): gives the value for the property Note: color values can be defined using hexadecimal notation to learn more about this go to this website - http://www.w3schools.com/html/html_colors.asp Grouping selectors and rules: Instead of having this: Quote:
Quote:
OR Instead of having this: Quote:
Quote:
|
|
||||
|
Inserting a Style Sheet
There are a number of ways you can apply style sheets to a web page. Inline styles: To use inline styles you place a 'style' attribute in a HTML tag. The 'style' attribute can state any CSS information. Here is an example: Quote:
Internal Style Sheets: Usually internal style sheets are placed in between the head tags in a HTML document. With the use of <style> tags CSS can be applied. An example on an internal style sheet: Quote:
External Style Sheets: Probably the most popular way of applying style sheets, with external style sheets you create a separate document that contains all the CSS information. While in the HTML document <link> tags need to be placed so the browser can read the information from the style sheet document. The <link> tags need to placed in between the <head> tags. Example: Quote:
Quote:
|
|
|||
|
http://www.csszengarden.com/ nice site for CSS.
|
|
|||
|
Quote:
Thanks for that ;-) Stuey |
|
||||
|
Yep csszengarden is amazing. I have seen it a few times, and used it to demonstrate to clients the power of css. (not that I am any good at CSS
![]() Hi Stuey, welcome to UKWMW ![]()
__________________
Umbrella Consultancy SEO WALES - Web Design Wales- Internet Marketing Consultancy - Google expert |
|
|||
|
Quote:
I hope that I can learn from the forum members ..... and contribute :bonk: |
|
|||
|
Theres another website on CSS, lots of CSS tricks: http://www.cssplay.co.uk
An example, this is a flyout transparent menu: http://www.cssplay.co.uk/menus/flyout_horizontal.html. And this is using jsut CSS. |
|
|||||
|
Background Properties In CSS background properties lets you set the background color for a web page and an image for the background. With the image background you are able to position the image, and also repeat the image horizontally or vertically. Examples Background Color: Quote:
Note: A link to CSS Color Values Background Image: Quote:
Repeating a Background Image: Quote:
Quote:
Background Position: The property for positioning images on backgrounds is; background-position. The values for background-position can be in the form of percentages (e.g. background-position: 100% 50%), length (e.g. background-position: 0px 30px), and keywords (e.g. background-position: right center). In all cases the horizontal position is specified first and the vertical position second. So for example the values 100% 0% will be positioned on the top right corner of the page. Single Image on a Background: Quote:
To have the image fixed at a certain point so it will not scroll with the rest of the page, just add this property to the body selector; background-attachment: fixed. This link directs to a table that contains most background properties and values: CSS Background Properties Table |
![]() |
| Bookmarks |
| Webmaster Resources |
| UK Web Hosting UK WW SEO Tools Free site submission Web Directory |
| Advertisement |
![]() |
| Site Of the Month |
![]() Nominate site of the month |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Short guide to SEO | lala | General Webmaster Talk | 9 | 04-25-2007 05:54 PM |
| SEO beginner guide. | etechsupport | General Search Engine Discussions | 3 | 12-30-2005 09:08 PM |
| Please guide me thrue | Dorra | iG Shop | 0 | 06-28-2005 01:37 AM |
| Installation Guide | mikejames | iG Shop | 2 | 12-24-2004 03:36 AM |
| UK Webmaster World Forums - Internet marketing, web development, domain names, SEO contest and discussuons. |
| Subscribe to our feeds |