Text only version of a site

Discussion in 'CSS' started by Richardf, Sep 5, 2006.

  1. #1
    Hi there,

    Hope all is well.

    Is there a quick way of creating a text only version of a site

    Thanks
     
    Richardf, Sep 5, 2006 IP
  2. the_pm

    the_pm Peon

    Messages:
    332
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Remove all images and stylesheets. Presto chango! All text Web site :)

    Seriously, it is that easy, if you've used good coding practices. A styled Web site is nothing more than a long text document with content wrapped in structurally accurate tags. Someone viewing a well formed site (think WCAG - Web Content Accessibility Guidelines - when you're thinking 'well fomed') using a device meant to only handle text (such as text browsers and many mobile devices) will find that such sites degrade very nicely.

    If you're looking for text-only for the sake of printers, create a print-only style sheet that has - img {display:none} as one of its components. That should surpress the images just fine.
     
    the_pm, Sep 5, 2006 IP
  3. Richardf

    Richardf Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi there the_pm,

    Thanks for the response. I think I get what your saying - effectively just strip the site of the styles and images and layout styles. I am guessing that is done by creating a new style sheet for the text only version - but how would I create a facility to switch the style sheets and also how would I switch it back.

    If some javascript code is required to switch style sheets, do you know where i could find it and just cut and paste it - i don't know any javascript yet.

    Thanks
     
    Richardf, Sep 9, 2006 IP
  4. +:::Spider25:::+

    +:::Spider25:::+ Peon

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Using javascript you can chamge the src property of the link (that references a stylesheet) tag.

    I think there will be a button (switch, something that call tha javascript) on your site for this purpose.


    Best regards,
     
    +:::Spider25:::+, Sep 9, 2006 IP
  5. Richardf

    Richardf Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi there Spider,

    Thanks for the message. Do you know where I can get the code to switch the style sheets ? I don't know any javascript and I would just like to cut and paste the code in.

    Thanks
     
    Richardf, Sep 10, 2006 IP
  6. the_pm

    the_pm Peon

    Messages:
    332
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Do you want to create a text-only version to which people can switch and remain in this version, or are you looking for people to be able to swap out graphics on a per-page basis, for, say, printing?
     
    the_pm, Sep 11, 2006 IP
  7. BenjArriola

    BenjArriola Peon

    Messages:
    175
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Display for web:
    <link href="file-web.css" media="screen, projection" type="text/css" rel="stylesheet" />

    Display for print:
    <link href="file-print.css" media="print" type="text/css" rel="stylesheet" />

    Just disable styles for text only.

    Feel free to use what ever method using Javascript, PHP, ASP, JSP, to enable, disabled the lines above.

    I hope that helps.
     
    BenjArriola, Sep 11, 2006 IP