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

Recommended Answers

All 4 Replies

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 */


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.

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

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

  • Internal style sheet

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

  • Inline style

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

<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

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.


Enough to get you started, I think

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.