Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 03-15-2010, 05:47 PM   #1
Daemon Poster
 
Join Date: May 2009
Posts: 690
Default text css help

I found a web site that seems to be good at telling me about css
But I need help with understanding some things.

It says if you have a Text you want underlined you type this

<P>text-decoration: underline;

And if you want the first Pareagraf to be Indent 30 pxales in you type this

<P>text-indent: 30px;

OK but it never tells me were to place it what I meen is if I have text

MY NAME IS BOB and I want this Intended do I type

<P>text-indent: 30px;
MY NAME IS BOB

and if I want to underline my name is bob do I type
<P>text-decoration: underline;
MY NAME IS BOB
__________________

biferi is offline   Reply With Quote
Old 03-16-2010, 06:29 AM   #2
In Runtime
 
Join Date: Jan 2010
Posts: 320
Default Re: text css help

Where are you putting your CSS 'stuff'?

I allways found it best to put it in an external folder (not embedded) then just import the CSS options you have set (saves so much time), with a link..

EG:

/webpage\css\code

or

<LINK REL= StyleSheet HREF="whateveryoumade.css" TYPE="text/css"

to reach your folder..

Then in there you can define your settings..

Eg <p1> underline, bold and size 12 font
<p2> 24pt, font helvetica

Then you can assign the headings to one of the styles, and it will automatically format it for you.


This is all rough just to give you ideas, hope i havent confused anything, havent worked with CSS for at least a couple of years now!
__________________

Luke_Uk_Baggy is offline   Reply With Quote
Old 03-16-2010, 11:21 AM   #3
Daemon Poster
 
Join Date: May 2009
Posts: 690
Default Re: text css help

Well this is what I ment

<P style="color:white">
Then I type my text here.</P>

I get this this will make my Pareagraph text white.
And because I put this code on the same page as my text I type it is called InLine.

Now how will this be easyer by puting it in an exturnal File????

anyone?
biferi is offline   Reply With Quote
Old 03-16-2010, 12:23 PM   #4
In Runtime
 
Join Date: Jan 2010
Posts: 320
Default Re: text css help

Quote:
Originally Posted by biferi View Post
Now how will this be easyer by puting it in an exturnal File????


OK,

For example, you have 15 <P1> sentences, and 15 <P2> sentences on your page.

All the <P1>'s are all currently defined as 'colour:white'
and all the <P2>'s are all currently ''colour:blue''

Now if you want to change the colour of both the <P1> and <P2> texts, you have to go down to each entry and type in the new, editted code 30 TIMES (15 x 2)

If you have it in an external file, and all the <P1>'s are set as white, you just change the external file once, and in turn all the text under the '<P1>' settings change to the new code.


Advantage is = Typing once to modify an unlimited number of things.
Luke_Uk_Baggy is offline   Reply With Quote
Old 03-16-2010, 03:28 PM   #5
Daemon Poster
 
Join Date: May 2009
Posts: 690
Default Re: text css help

OK this is were I am lost you don't have code for all 15 Linbes it just is like this.

<p1 style="color:white;">

Then I type my 15 Lines of text here like this and then I end it with a
</P>

am I not right what would it look like

every Line does not have code
biferi is offline   Reply With Quote
Old 03-16-2010, 04:36 PM   #6
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: text css help

Quote:
every Line does not have code
Huh? Not every line needs code. (X)HTML works via tags - the style is applied to everything inside the given tag.

It's the same principle along the lines of your whole page, it starts with <html> and ends with </html>. Since that tag encompasses everything, all of your markup in that page is HTML - you don't need to specify it on each and every line!
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 03-16-2010, 04:56 PM   #7
Daemon Poster
 
Join Date: May 2009
Posts: 690
Default Re: text css help

I think I got it
This is Embeded C.S.S Code. This Code must be placed between the <HEAD> Tags.

<style TYPE="text/css">
<!--

This Code must be placed between the <BODY> Tags.

background: black;
color: white;
a:link color: white;
a:visited color: blue;

this tells the page color to be black
background: black;

This tells the text colo to be white
color: white;

this tells a link to be white
a:link color: white;

this tells a visited link to be blue
a:visited color: blue;

tell me if I have it yet???
biferi is offline   Reply With Quote
Old 03-17-2010, 06:02 AM   #8
In Runtime
 
Join Date: Jan 2010
Posts: 320
Default Re: text css help

R.E. this question you asked:

''Originally Posted by biferi
Now how will this be easyer by puting it in an exturnal File????''

Imagine if you had a standard website, say 20 pages. If you wanted to change <P1> you would have to go to each page and edit the code, in the lines of each page.

If you had them attached to a style sheet, you could change the format of each <P1> on every page by only typing once, in the .css file.


... Advantage Number 2 - Keeping content seperate from formatting. (Saves time!)



(Read up a little more on it, maybe have a play around with a few basic webpages)
__________________

Luke_Uk_Baggy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 10:12 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0