Forum Moderators: not2easy

Message Too Old, No Replies

adding css to an already existing site

adding css to an already existing site

         

riospace

7:54 pm on Jul 18, 2006 (gmt 0)

10+ Year Member



I have finally decided to add css code to my existing site. My site has about 2,000 pages. I just bought Dreamweaver 8 and I have set up my external css document. Now I just need to insert the link to my external css on all my pages.

This is probably a dumb question, but I am new a css. Do I need to take out all of my old html formatting after I insert the css? If not what happens? Do I need to remove the old page properties? What about inline tags etc. Please help, I have alot of pages to do.

Do I need to take the previous formatting out of all of my pages? Example:
<body topmargin=0 bgcolor="#FFFFFF" text="#000000" link="#5F4480" vlink="#AB9BD9" alink="#E8C539">

Also, is there a css command that I can add to my external css code that will disable right clicks?

riospace

8:41 pm on Jul 18, 2006 (gmt 0)

10+ Year Member



Also, is is okay to just use css for font and links but still use table layout

riospace

4:56 pm on Jul 21, 2006 (gmt 0)

10+ Year Member



I guess this was a dumb question that nobody wanted to answer. I have learned that you do not have to get rid of your old tags, but should I and if so what is the fastest way. Trying to learn CSS, be patient with me.

encyclo

5:02 pm on Jul 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi riospace and welcome to WebmasterWorld, I'm sorry that your initial post was missed.

The great advantage with CSS is that you can go in steps - so you can start by linking in your external stylesheet and start replacing inline definitions such as font colors with CSS rules. You can continue using your tables-based layout for the moment.

Usually if you leave the presentational markup in place, it will override the linked CSS file - so you should work to removing all the presentational attributes across your site.

Don't forget to check your progress with the HTML validator [validator.w3.org] and CSS validator [jigsaw.w3.org], meaning that you can clean up your markup and CSS across your site. :) I'm not very familiar with Dreamweaver, but you should be able to use the global search and replace function to clean up the old markup.

disable right clicks?

This is not something CSS can do - it is a presentational language. You can use Javascript, but disabling right-click is very disruptive and annoying for end users, and has no effect in blocking the viewing of the source code or the copying of images.

Jim Catanich

3:18 am on Jul 27, 2006 (gmt 0)

10+ Year Member



Having done this before, you should remove as much of the HTML formatting as you can. Besides reducing the size for the page, it appears that the HTML formatting overrides the CSS formatting. So to move to a complete CSS formatting scenario, you will have to remove all HTML formatting

As for the <table> leave them. To go to a complete tabless design will be to big of a change for now. And I don't think it will buy anything.

Good luck