LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 610 users online 211471 members 1539 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
dont notice me
Movies: 10 things i hate about you
Mood: Carefree
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
4 online / 51 MPM
Fresh Topics
  LiveWire / Technical Forums / Web Design & Search Engine Optimization / Viewing Topic

CSS help
Replies: 17Last Post Sep. 11, 2008 12:33pm by Dexus
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Pages: 1 2  Next » Email Print Favorite
( SilverDragon1Wings )


Executive
Reply
I read the 'CSS and HTML help' post before posting this topic, and that confused me instead of giving me pointers.

So I'm learning HTML by that website htmldog.com, and I am on the CSS code practice. Thing is, the first lesson they have is incorporating color into the text.

They start out with in-line style color codes, and I tried incorporating this into my text editor {notepad...lol} and for some reason, the code isn't doing anything. What am I doing wrong?

This is the tag that they have for in-line style:
<p style="color: red">text</p>

I tried playing around with it to see what else could work, but since I'm learning, that is kind of hard to do.

Do you guys need a screen shot of what I'm typing in as the code, or can you easily tell from this post what I'm doing wrong?


11:19 am on Sep. 11, 2008 | Joined: Sep. 2005 | Days Active: 269
Join to learn more about SilverDragon1Wings New York, United States | Straight Female | Posts: 902 | Points: 3,617
Link01


Time Lord

Patron
Reply
You need to use special code

#FF0000

that is red

It is easy to get if you have photoshop etc should tell you

http://www.december.com/html/spec/colorhex.html

or go there

Post edited at 11:24 am on Sep. 11, 2008 by Link01

-------
Doctor who - Wibbly Wobbly Timey Wimey!
used to show time travel's effects.


11:22 am on Sep. 11, 2008 | Joined: Feb. 2006 | Days Active: 962
Join to learn more about Link01 Wales | Straight Male | Posts: 35,832 | Points: 45,294
( SilverDragon1Wings )


Executive
Reply
If I need to use the codes for the actual colors, why didn't the tutorial site mention that? Or is that type of code advanced for what I'm learning?
{I'm in the beginner tutorial}

11:25 am on Sep. 11, 2008 | Joined: Sep. 2005 | Days Active: 269
Join to learn more about SilverDragon1Wings New York, United States | Straight Female | Posts: 902 | Points: 3,617
Dexus


Guru

Patron
Reply
So if I understand you correctly your simply typing in
Code:
<p style="color: red">text</p>

Into notepad and saving it etc. then trying to view using a web browser?

-------
Dexus Joke Thread 1
Dexus Joke Thread 2
I took a hammer to every momento [xdark angelx is my wife.]

11:25 am on Sep. 11, 2008 | Joined: Jan. 2005 | Days Active: 1,066
Join to learn more about Dexus Ireland | Label Free Male | Posts: 8,761 | Points: 20,869
Link01


Time Lord

Patron
Reply
Quote: from SilverDragon1Wings at 7:25 pm on Sep. 11, 2008

If I need to use the codes for the actual colors, why didn't the tutorial site mention that? Or is that type of code advanced for what I'm learning?
{I'm in the beginner tutorial}

It is what I had to do

-------
Doctor who - Wibbly Wobbly Timey Wimey!
used to show time travel's effects.


11:26 am on Sep. 11, 2008 | Joined: Feb. 2006 | Days Active: 962
Join to learn more about Link01 Wales | Straight Male | Posts: 35,832 | Points: 45,294
( SilverDragon1Wings )


Executive
Reply
Quote: from Dexus at 2:25 pm on Sep. 11, 2008

So if I understand you correctly your simply typing in  
Code:
<p style="color: red">text</p>

Into notepad and saving it etc. then trying to view using a web browser?

Correct. Is notepad the wrong text editor for that code?


11:26 am on Sep. 11, 2008 | Joined: Sep. 2005 | Days Active: 269
Join to learn more about SilverDragon1Wings New York, United States | Straight Female | Posts: 902 | Points: 3,617
Dexus


Guru

Patron
Reply
Quote: from SilverDragon1Wings at 7:26 pm on Sep. 11, 2008

Quote: from Dexus at 2:25 pm on Sep. 11, 2008

So if I understand you correctly your simply typing in    
Code:
<p style="color: red">text</p>

Into notepad and saving it etc. then trying to view using a web browser?

 

Correct. Is notepad the wrong text editor for that code?


No notepad is fine, its just there needs to be more code.
A web browser will only recognise it as text without html.
CSS and basic html need to be used together.  

Code:

<html>
<head>
<title>CSS Practice</title>
</head>

<body>
<p style="color: red">text</p>

</body>
</html>

Any CSS coding should be within the body tag. Try doing exactly what you were doing with the html code now in place and it should work fine.

Post edited at 11:31 am on Sep. 11, 2008 by Dexus

-------
Dexus Joke Thread 1
Dexus Joke Thread 2
I took a hammer to every momento [xdark angelx is my wife.]


11:30 am on Sep. 11, 2008 | Joined: Jan. 2005 | Days Active: 1,066
Join to learn more about Dexus Ireland | Label Free Male | Posts: 8,761 | Points: 20,869
Dexus


Guru

Patron
Reply
Oh and I forgot, when saving it, don't save it as a text file. Change it to all files and add the .html extension.

-------
Dexus Joke Thread 1
Dexus Joke Thread 2
I took a hammer to every momento [xdark angelx is my wife.]

11:33 am on Sep. 11, 2008 | Joined: Jan. 2005 | Days Active: 1,066
Join to learn more about Dexus Ireland | Label Free Male | Posts: 8,761 | Points: 20,869
kellyxfanelly


Dairy Product Addict
Reply
Changing the text color?
I usually use this;
<font color="color">

-------
MOTOCROSS = L0VE

11:35 am on Sep. 11, 2008 | Joined: Oct. 2007 | Days Active: 79
Join to learn more about kellyxfanelly Florida, United States | Straight Female | Posts: 913 | Points: 1,798
( SilverDragon1Wings )


Executive
Reply
I tried to screen capture the code, but I don't know how to put that into here, so I guess I'll have to type out what I did:
So I wanted to write something and do HTML/CSS around that, but I couldn't think of anything so I put in lyrics....lol.
Anyway, this is the beginning code I have. It's just a portion of what is in notepad, because there's too much script to copy and paste into here. I did include the closing tags for head and body.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html>


<head>
<title>CSS Practice</title>
</head>

<body>
<h1>CSS and HTML</h1>

<p style="color: blue">
<h2>I'm not Jesus</h2>
<h3>Apocalyptica</h3></p>

This is the way I tried playing with it, because when I put just the code in, it would come up as 'text' written in the document, instead of the code changing the color of the script. And I changed the color that I wanted it to be, from what HTML dog used.


11:37 am on Sep. 11, 2008 | Joined: Sep. 2005 | Days Active: 269
Join to learn more about SilverDragon1Wings New York, United States | Straight Female | Posts: 902 | Points: 3,617
( SilverDragon1Wings )


Executive
Reply
Quote: from Link01 at 2:22 pm on Sep. 11, 2008

You need to use special code  

#FF0000

that is red

It is easy to get if you have photoshop etc should tell you

http://www.december.com/html/spec/colorhex.html

or go there


Thanks for the link, I'll definitely reference this.


11:38 am on Sep. 11, 2008 | Joined: Sep. 2005 | Days Active: 269
Join to learn more about SilverDragon1Wings New York, United States | Straight Female | Posts: 902 | Points: 3,617
Link01


Time Lord

Patron
Reply
Quote: from SilverDragon1Wings at 7:38 pm on Sep. 11, 2008

Quote: from Link01 at 2:22 pm on Sep. 11, 2008

You need to use special code  

 #FF0000  

 that is red  

 It is easy to get if you have photoshop etc should tell you  

 http://www.december.com/html/spec/colorhex.html  

 or go there


Thanks for the link, I'll definitely reference this.


you can get some of my code if you wish

-------
Doctor who - Wibbly Wobbly Timey Wimey!
used to show time travel's effects.


11:43 am on Sep. 11, 2008 | Joined: Feb. 2006 | Days Active: 962
Join to learn more about Link01 Wales | Straight Male | Posts: 35,832 | Points: 45,294
Dexus


Guru

Patron
Reply
Now I see your problem!

<p style="color: blue">

Changes every bit of text in a paragraph blue. However you don't have paragraphs, you have 2 different header tags.

If your looking every bit of text on the page to be of a certain colour you should really have this:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html>


<head>
<title>CSS Practice</title>

<style type="text/css">
 body { color: blue;}
</style>

</head>

<body>
<h1>CSS and HTML</h1>
<h2>I'm not Jesus</h2>
<h3>Apocalyptica</h3></p>

</body>
</html>



-------
Dexus Joke Thread 1
Dexus Joke Thread 2
I took a hammer to every momento [xdark angelx is my wife.]


11:47 am on Sep. 11, 2008 | Joined: Jan. 2005 | Days Active: 1,066
Join to learn more about Dexus Ireland | Label Free Male | Posts: 8,761 | Points: 20,869
( SilverDragon1Wings )


Executive
Reply
The lyrics follow, and those are in paragraphs, not headers. Does that change anything? I was kind of hoping to put the headers in blue font and the lyrics {paragraphs} into...I dunno...green or any other color.

11:50 am on Sep. 11, 2008 | Joined: Sep. 2005 | Days Active: 269
Join to learn more about SilverDragon1Wings New York, United States | Straight Female | Posts: 902 | Points: 3,617
Dexus


Guru

Patron
Reply
Quote: from SilverDragon1Wings at 7:50 pm on Sep. 11, 2008

The lyrics follow, and those are in paragraphs, not headers. Does that change anything? I was kind of hoping to put the headers in blue font and the lyrics {paragraphs} into...I dunno...green or any other color.

It does change everything but any other tags you enter with a different style will change accordingly.
If you wanted to change each colour separately you could have.


Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html>


<head>
<title>CSS Practice</title>

<style type="text/css">
body { color: blue;}
h1 { color: black;}
h2 { color: red;}
h3 { color: green;}
p { color: yellow;}
</style>

</head>

<body>
<h1>CSS and HTML</h1>
<h2>I'm not Jesus</h2>
<h3>Apocalyptica</h3></p>

</body>
</html>

It just means now with the body colour tag, anything not inside either the h1, h2, h3, and p tags is now blue.

Post edited at 11:57 am on Sep. 11, 2008 by Dexus

-------
Dexus Joke Thread 1
Dexus Joke Thread 2
I took a hammer to every momento [xdark angelx is my wife.]


11:55 am on Sep. 11, 2008 | Joined: Jan. 2005 | Days Active: 1,066
Join to learn more about Dexus Ireland | Label Free Male | Posts: 8,761 | Points: 20,869
Pages: 1 2  Next » Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Web Design & Search Engine Optimization / Viewing Topic