1.11M Members

using css on html

 
0
 

hi,
am trying to learn using css, i know a bit of html. My problem is the css dont seem to work on html,i dont know wat am doing wrong.

thanx for any help

 
0
 

Do you have any code to show us?

You can either link in CSS, or write it directly to the page. If you are writing directly to the page (can get messy as you build more and more complex sites) then you would do this:

<style type = "text/css" >

    /* CODE GOES HERE */

</style>

Otherwise to link in a stylesheet it would be:

<link rel = "stylesheet" type = "text/css" href = "/LOCATION.css" />

If using either of those doesn't work, then there might be something wrong with your CSS itself, the location you are retrieving it from or on some networks (such as work and school networks), pulling external files is sometimes restricted.

 
0
 

As stated by harris,please show up your code to expect better help.Most propably the way you are using this is wrong.
There are three ways of inserting a style sheet:

  • External style sheet

    <head>
    <link rel="stylesheet" type="text/css" href="mystyle.css">
    </head>

  • Internal style sheet

    <head>
    <style>
    hr {color:sienna;}
    p {margin-left:20px;}
    body {background-image:url("images/back40.gif");}
    </style>
    </head>

  • Inline style

    <p style="color:sienna;margin-left:20px">This is a paragraph.</p>

 
0
 

<p style="color:red;margin:20px">your content</p>
you can start with simple structure in you site, when you get used to it, you can use other structures

 
0
 

Did you try googling for something like "CSS Tutorial"? Google and a common sense search phrase should always be your first port of call rather than a question on a forum. I did some of the work for you so here are a few links.

HTMLDog
W3Schools
http://learn.shayhowe.com/html-css/

Enough to get you started, I think

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: