CSS - How do I encorporate it into a HTML doc?

They have: 344 posts

Joined: Jun 2002

I have read a tutorial and it makes it kinda clear. But I am unsure of how to include it into my doc.

This is:

Test Tables thing

They have: 344 posts

Joined: Jun 2002

By this I mean placing the CSS into or replacing my nested tables. Is there a code for that? Or do I have to create one like:

<style type="text/css">
h3 {font-family: times}
p {font-family: courier}
p.sansserif {font-family: sans-serif}
</style>
'

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

This site tells most everything that you need to know about basic css.

This page within the above site will explain different ways to apply CSS to a HTML document with a stylesheet.

Sonia Smiling

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Quote: Originally posted by Timewell
By this I mean placing the CSS into or replacing my nested tables.

You will want to master basic styling before abadoning the familiar table layout.

Then you will have to revisit your knowledge of HTML and throw out all the things you do to make things look right on the page, as that would be handled by CSS.

It's probably a good idea for you to walk through the examples and get familiar with CSS before tackling the advanced concepts that would allow you to not use tables successfully.

They have: 344 posts

Joined: Jun 2002

I have also been recommended this:

W3 Schools

Are they as useful as the other links provided?

The Webmistress's picture

She has: 5,586 posts

Joined: Feb 2001

If you read through it and you learn something then it is useful Wink

They have: 344 posts

Joined: Jun 2002

What I don't understand is that these guides all talk about Header 1 etc. I don't have a Header 1 in my document and therefore I am not sure how to substitute it in tables.

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Header tags give your document structure. For example, on your first page you have:

Quote:
News Section
A warm welcome!
by RobT on 17 Nov '02 0:10 AM
Hi guys!

An example of good use of the header tags would be to use the following:

News Section
A warm welcome!
by RobT on 17 Nov '02 0:10 AM
Hi guys!

Of course you would have to use CSS to alter the size of the Header tags because the default size for and are pretty big. Maybe this will explain:

Create Custom Headers With CSS

You would also need to remove the font tags and bold tags that you have in your HTML now. The css would replace that.

Another plus in using the Header tags is it helps with search engine placement. Use your most important keywords within your header tags.

They have: 344 posts

Joined: Jun 2002

When I do that though, I lose the grey background!

They have: 344 posts

Joined: Jun 2002

Do I code the page with Coranto in???

If so can I have an example cause I am definately not understanding how to replace the tags. Once one page is coded I can probably see what to do!

Site

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Oh my, now you have me confused. I thought you were talking about adding header tags to this page here:
http://cmdirector.neosurge.net/test.shtml

It looks like you are using Microsoft Publisher to do this page so I can't help you there. All that clutter code is cluttering me brain. Wink

:freak: Note for any other reviewers: Make sure your volume isn't turned up loud. Music will scare the crap out of you on this page. http://cmdirector.neosurge.net/ :freak:

What is Coranto?

Busy's picture

He has: 6,151 posts

Joined: May 2001

I don't know if publisher can do what you are wanting to do.

For what your contents are, you dont need to use table at all, if you want to use CSS more to control the layout use 's to postion stuff.
Get rid of publisher, at least use frontpage (I hate saying that) if you must use an editor/program.

those are some of the longest span tags I've ever seen

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

This is Coranto.

Quote: Description [from HotScripts]:
Next generation NewsPro script that includes support for unlimited users, easy webbased setup and configuration, fully customizable news style, auto-archiving, support for add-on modules, ability to maintain different news pages/categories, email notification option, and more.

Wink

They have: 344 posts

Joined: Jun 2002

oops! I gave the wrong URL!

Sorry guys! Correct URL

That should work now!

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Quote: If so can I have an example cause I am definately not understanding how to replace the tags. Once one page is coded I can probably see what to do!

You said that you don't understand how to replace the table tags. Are you wanting to totally get rid of all tables on this site? If not, what do you mean by "replace"?

*gets confusing doesn't it?* Wink

They have: 344 posts

Joined: Jun 2002

Yep very!

I dunno now I am confused! I was told that CSS cuts down on file size and therefore I want to do this. I am not sure how to do so after reading through many, many many tutorials! I know that it has to be an external file though as then I can change stuff easily. My site will have a lot of pages!

What do you recommend? Should I keep the tables or what?

The Webmistress's picture

She has: 5,586 posts

Joined: Feb 2001

If you haven't used CSS before, I would suggest you learn how to get rid of font tags, backgrounds and that kind of stuff from your pages into an external style sheet and then once you have that working progress on to the more complicated task of doing layout with CSS.

Julia - if life was meant to be easy Michael Angelo would have painted the floor....

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

As Julia says, and as I mentioned before, you'll want to learn some basic CSS before trying to eliminate tables.

CSS will still lower your code bloat (you're not really trying to do this in publisher, are you!?), by allowing you to eliminate font tags and style the colours and fonts on the page.

But unless you have a solid handle on HTML, it's not going to help to look at CSS.

Instead of trying to edit a page, why not start with a new page and practice until you are familiar. Then editing existing pages will be easier.

They have: 344 posts

Joined: Jun 2002

No I am not doing it in Publisher! I am doing it in Notepad!

They have: 344 posts

Joined: Jun 2002

Quote: Originally posted by The Webmistress
If you haven't used CSS before, I would suggest you learn how to get rid of font tags, backgrounds and that kind of stuff from your pages into an external style sheet and then once you have that working progress on to the more complicated task of doing layout with CSS.

I have tried to understand but I am getting myself more confused. How much, roughly, does it know off the size of each file (%)?

I just need an example in one of my pages to start me off!
Sad

Busy's picture

He has: 6,151 posts

Joined: May 2001

If your going to use that naviagtion set up you posted in the other thread, keep to tables, CSS is pretty good at aligning chunks of content but doesnt do to well with heaps of little nested chunks in bigger chunks. Unless you use layers then you make your site unaccessable to some browsers

They have: 344 posts

Joined: Jun 2002

What browsers are those? How would I encorporate layers?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Okay, look, Timewell, you are getting WAY ahead of yourself! You can't hope to start learning CSS when you're not clear on HTML. Really. Here's what I want you to do: take all the content you want to have on a sample page. Mark it up just with headings and and such.

Next, figure out what sections you want to have (navigation, posts, title, logo, footer, et cetera) and put divs around those pieces with ids like this:

Okay, once you've done this, it will look really plain and just be a big long page. That's EXACTLY what you want.

Once you have that all in place, and you validate the code to make sure it's all correct, then you can add in the CSS and use it to control the presentation.

When you have this sample page ready and it makes sense to you, post again and I'll walk you through the process of figuring out the CSS.

***

Anything but Netscape are those browsers, layers are a proprietary code form for Netscape only. DIV is cross-browser.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.