Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Basic css code
stillkill
post Sep 16 2004, 03:54 PM
Post #1





Guests






to create a website in css...you will need to start with the basic code...

/* CSS Document */
Go to the top of the page
 
+Quote Post
FirefoxRocks
post Mar 7 2008, 12:50 AM
Post #2


Super Member
Group Icon

Group: [HOSTED]
Posts: 693
Joined: 12-July 06
From: Ontario, Canada
Member No.: 14,464



First of all, you don't create websites with CSS, you style websites with CSS.
As for the "basic code", you could tell that using internal CSS style sheets with your HTML documents is through the use of the style element.
This is how you define an internal style sheet in HTML:
HTML
<style type="text/css">
...some style info here...
</style>

This is how you define an internal style sheet in XHTML:
HTML
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
...some style info here...
/*<!]]>*/-->
</style>


You don't need to learn CSS in a specific order, you learn the properties that you need to use first. Of course you must learn the correct syntax first, which is this:
CODE
tagname {property: value}


So if you want to colour paragraphs blue, you would do this:
CODE
p {color: blue}

Each pair of properties and values are separated by semicolons.

This is basic CSS, there is a lot more out there about CSS, search it for more information.
Go to the top of the page
 
+Quote Post
kgd2006
post Mar 7 2008, 05:45 AM
Post #3


Premium Member
Group Icon

Group: [HOSTED]
Posts: 318
Joined: 1-March 06
Member No.: 11,638



CSS is more commonly used throughout various websites now since it gives the web developer the ability to change attributes of an item globally across various pages. Table website layouts are starting to cease and the use of CSS is now the movement towards the route of web 2.0. CSS is now being supported by various browsers, but as you learn the use of CSS you will learn that each browser renders CSS differently. For example, what renders perfectly in firefox may however end up rendering differently in Internet explorer. Most of the time valid css is rendered perfectly in firefox, but Internet explorer, however, cannot render CSS too well. Certain attributes used in IE can have odd effects. For example, there are certain times issues with the background attribute used in Internet explorer will cause the overlaying object on the background attribute to disappear in internet explorer. This has been an issue with internet explorer and has been discussed ten times over, if you are interested in more information on this odd internet explorer issue just search "dissapearing text in IE with background." The hack that is used to remedy the problem that IE has problems rendering, would be to add the attribute of height equals to 1 percent. This will force IE to display the overlaying element on the background attribute properly. This is one of the many examples of IE bugs that I have came accross as a webdeveloper when building css layouts in IE. Also when you start to go deep into learning CSS you will understand how much the cascading hierarchy is very important, and so you must layout your code in proper coding format, or you will be overwhelmed with CSS issues in big site projects.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Code To Send An Email From A Form(10)
  2. Simple Java Script Code For Print Pages(0)
  3. Jscript/html/css Code Help(8)
  4. Free Shoutbox? HTML, Flash or PHP Code(24)
  5. I Need Help With A Code: Myspace Profile Css(5)
  6. To Hide Your Source Code(13)
  7. Blogger Code Problems(1)
  8. Home Videos(4)
  9. Free Code Snippets And Css Layout(14)
  10. Code Improvement And Optimization(2)
  11. The Step Up. A Guide For Myspace Design(2)


 



- Lo-Fi Version Time is now: 7th October 2008 - 09:03 AM