Text Only Page

C

Chris

My layout will be totally CSS driven and the content will be pulled out of a
database. This content may well have images etc in it. Beyond some kind of
regular expression to strip out certain tags is there a more elegant CSS
solution to creating a text only page. I was thinking of setting the image
tag etc within the content div to invisible but that might be a bit of a
hack. I just was wondering what would be considered the proper standards
approach.
 
A

Alan J. Flavell

My layout will be totally CSS driven

Have you considered first evaluating what the real problem is, before
fixing the mechanics of a solution?
and the content will be pulled out of a database. This content may
well have images etc in it. Beyond some kind of regular expression
to strip out certain tags is there a more elegant CSS solution to
creating a text only page.

What are you aiming to achieve by this? My best advice, on the basis
of observing past results, is that generating a text-only page is a
pointless distraction. Concentrate on creating a single any-browser
page which will calmly adapt itself to any situation in which it finds
itself. Text-only browsers absolutely don't need text-only pages -
they simply won't load the images, and will display the alt text
instead. So if that's your aim, concentrate on making the alt texts
really work.

Once upon a time, the BBC News site news.bbc.co.uk tried creating
text-only pages (and their www.bbc.co.uk site still does), but they
seemed to me to be rather pointless. I can get a better text-only
result by choosing my preferred browser settings - a technique which
should work on /any/ adequately-made (i.e flexible) site. Their alt
texts had been badly chosen, and they could have got better results
overall by dealing with /that/ problem.

What their News site /now/ offers is a "Low graphics" version, which
admittedly does have some kind of logic behind it, for those with
limited bandwidth or limited display.

regards
 
N

Neredbojias

My layout will be totally CSS driven and the content will be pulled
out of a database. This content may well have images etc in it. Beyond
some kind of regular expression to strip out certain tags is there a
more elegant CSS solution to creating a text only page. I was thinking
of setting the image tag etc within the content div to invisible but
that might be a bit of a hack. I just was wondering what would be
considered the proper standards approach.

Setting the img tag invisible would be pointless. Setting it to
display:none might be more appropriate but just as futile.

A text-only layout would/should be quite different than an imaged one which
strongly suggests that a different layout is needed. Also, what about
background images? Just make a different page and avoid the convolutions
of misapplied css.
 
A

Andy Dingley

Chris said:
My layout will be totally CSS driven and the content will be pulled out of a
database. This content may well have images etc in it. Beyond some kind of
regular expression to strip out certain tags is there a more elegant CSS
solution to creating a text only page.

Don't create a text-only page.

One of the fundamental points behind CSS is that it removes the need to
have "print friendly", "text only", "large type" and "accessible" pages
as special pages. You stick up one page, you (optionally) attach
different media-specific CSS to it, then you let the client-side work
the rest out for itself.

It's very rare to need a "text only" page. Even as a specialised page,
the distinction isn't about being "text only", it's about still working
just as well without images. Good image-based CSS design delivers this
anyway, because you've stopped making the workable presentation of text
dependent on additional tricks with images. As a result then just
letting the client-side throw the images away leaves a still-usable
page behind.

I doubt you need a text-only page. I believe good CSS can deliver
everything you do need, just by following basic good practice. To say
any more we'd really have to know more detail about what you're trying
to achieve here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top