CSS

  • Thread starter Thread starter Harry
  • Start date Start date
H

Harry

once i have created my style sheet and have it linked to
the page how do i then specify which areas of text are
what e.g. what is just paragraph text and what is
something else say a header or something? at the moment
all the text i type seems to fall under the 'p' selector.

or am i going about this the wrong way?
 
It would help if you understood a bit about HTML, since CSS is applied to
HTML elements. CSS can be applied to almost anything. What is text, and what
is something else is entirely up to you. Apparently, you've only been
creating text in paragraphs. You can put text in tables, divs, spans, and a
whole realm of other HTML elements, and apply styles to them as well.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.
 
yes i have tx in tables so how do i specify what is one
type of text from my css and what is another?
 
you'd create a different class for each type of text that is in a cell,
you'd then id that cell within the html of your page.
for example you may have a cell that contains something you want as a
header. you might create something like this on your style sheet:
td.header{
color:red
font-family: "times new roman", times, serif
font-size: 18px
}
then in your page you would find that cell in the html and modify the tag
like this:
<td class="header">
and all contents of a cell marked this way will take on the attributes
you've defined on your style sheet.

You should go to www.bradsoft.com and take the free trial of topstyle.
it'll keep you from making mistakes with it's style sweeper and it's got
some good tutorials built in. it's a very good program and I wouldn't work
without it....it would have stopped me from the errors in the above style
example ;-)
HTH
 
Back
Top