1,105,594 Community Members

using css on html

Member Avatar
nitos
Newbie Poster
9 posts since Feb 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 3 [?]
 
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

Member Avatar
Octet
Posting Pro
579 posts since Nov 2011
Reputation Points: 45 [?]
Q&As Helped to Solve: 53 [?]
Skill Endorsements: 16 [?]
Featured
Sponsor
 
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.

Member Avatar
IIM
Master Poster
742 posts since Jun 2011
Reputation Points: 163 [?]
Q&As Helped to Solve: 169 [?]
Skill Endorsements: 24 [?]
 
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>

Member Avatar
tahuuson
Newbie Poster
3 posts since Jul 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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

Member Avatar
jrewing
Newbie Poster
9 posts since Jun 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
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 three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: