Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Sep 2005
    Posts
    1
    Member #
    11456
    Hello,

    I have a site that doesn't use style sheets; I now think that its time to get on board.

    The trouble is, I have font tags everywhere in all the pages.

    Can anyone suggest the most efficient approach to converting an entire site to use style sheets when it was not initially set up with them?

    Many thanks for you help :-)

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    There could be some software.. However you will still have to remove the font tag stylings.

    If i was in your rather uncomfy shoes, I would open a new text document, and go through your html code, and whenever you see a font styling, write the css styling for it, and remove the old font tag and replace it with class="className" etc...

    You will find some sections of your code will use the same css rule.

  4. #3
    Senior Member Rince's Avatar
    Join Date
    Nov 2004
    Posts
    183
    Member #
    8318
    I've had to do this allot when using content suplied by other people. What I normally do is (after backing up the origonal) I run the page through the build in validator in Dreamweaver. This will through an error at every font tag. Working with the code window open, double click the error message and it will highligh the code. Then just tap the Del key. Tag gone. You can work through a whole page in just a few minutes - only fixing the font tag problems (leave the other bugs till later).

    This only removes the opening font tags. Now all you need to do a find and replace form the edit menu to remove all the spare </font> close tags.

    The result will be a page with no text formating at all. You can now work through re-editing the text with css fonts.

    A more sensible solution would be to ditch the old html completly. Make a new design using css and then copy over just the text - not the text and html.

  5. #4
    Member
    Join Date
    Mar 2004
    Posts
    40
    Member #
    5208
    'more eric meyer on css' has a chapter devoted to converting a table based design to css based design. That would be helpful I think

  6. #5
    Senior Member Rince's Avatar
    Join Date
    Nov 2004
    Posts
    183
    Member #
    8318
    Converting a table based design to css is pointless. If you are going to change from tables to using css, make a complete new design. Trying to get a design that does not use table to look like a design that does use tables is probably worse than useing tables in the first place. After all, the best way of making a design that looks like a tabled design is to use tables.

    If you are making a design that doesn't use tables - then make it look and behave like the elements you are using are supposed to look and behave. 99% of css hacks are to make div tags behave like tables. If you brake out of the rows and columns thinking, then you will make much nicer to use and easier to code designs.

    Anyway - the origonal question was about getting rid of font tags in favour of css, not about getting rid of tables. And that's what css is really about. The argument about css v table is a non starter cause it's the wrong argument. But hey, I'm at risk of repeating myself. Just read http://www.splodgy.com/modules/dokuwiki/doku.php?id=css

  7. #6
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    html tidy

    the first thing i would do is use tidy (http://tidy.sourceforge.net/)
    they have tidy and tidyui use the clean feature it will convert font tags to css
    Thee Pyro Wolf

  8. #7
    Senior Member
    Join Date
    Aug 2003
    Posts
    444
    Member #
    2801
    Another option is a regular expression based search and replace. You can do it for all the files in your site using Crimson Editor: http://crimsoneditor.com

    HTH
    eKstreme
    eKstreme.com - Free website tools!
    fontfox - free fonts Hand-picked quality fonts.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:04 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com