text css help

biferi

Daemon Poster
Messages
690
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
 
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!
 
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?
 
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.
 
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
 
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!
 
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???
 
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)
 
Back
Top Bottom