Jump to content


include Css in html


4 replies to this topic

#1 !nTeL

    Young Padawan

  • Members
  • Pip
  • 7 posts

Posted 12 August 2006 - 08:19 PM

hi.

im totally new to css..

i was wonder how can i include CSS in my index file

i want to include the css file so i can use "class" in my <TD> tag

for example (HTML)

<td class="first">


example (CSS)


td.first{
font-family:Tahoma
}

Edited by !nTeL, 12 August 2006 - 08:25 PM.


#2 Hayden

    P2L Jedi

  • Members
  • PipPipPip
  • 716 posts
  • Gender:Male
  • Location:Texas

Posted 12 August 2006 - 08:58 PM

<style type="text/css">
<!--
td.first { font-family:Tahoma }
-->
</style>
do that in between your <head></head> tags.

#3 zetsumei

    Young Padawan

  • Publishing Betazoids
  • Pip
  • 269 posts
  • Gender:Male
  • Location:127.0.0.1

Posted 12 August 2006 - 09:01 PM

you beat me to it spatial...:P

Edited by zetsumei, 12 August 2006 - 09:02 PM.


#4 Pooch

    Young Padawan

  • Members
  • Pip
  • 63 posts

Posted 12 August 2006 - 09:03 PM

First create a blank text document and fill it in with all your css definitions.

Example
td.first{
font-family:Tahoma
}

Then save the page as page.css.

In your HTML page put this tag in between your <head></head> tags. Replace http://www.Yoursite.com/page.css with your website and css file.

<link href="[i]http://www.Yoursite.com/page.css[/i]" rel="stylesheet" type="text/css">

That's all. For a better example view the page source of any site that uses css. IE: Pixel2life.com

Edited by Pooch, 12 August 2006 - 09:04 PM.


#5 !nTeL

    Young Padawan

  • Members
  • Pip
  • 7 posts

Posted 12 August 2006 - 09:26 PM

View PostPooch, on Aug 13 2006, 02:02 AM, said:

First create a blank text document and fill it in with all your css definitions.

Example
td.first{
font-family:Tahoma
}

Then save the page as page.css.

In your HTML page put this tag in between your <head></head> tags. Replace http://www.Yoursite.com/page.css with your website and css file.

<link href="[i]http://www.Yoursite.com/page.css[/i]" rel="stylesheet" type="text/css">

That's all. For a better example view the page source of any site that uses css. IE: Pixel2life.com

hehe.. i did it like this.. but i forgot to add rel="stylesheet"

:P:D thanks!! :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users