Reply to Re: duplicating <pre> with other tags

Your name:

Reply:


Posted by Andy Dingley on 11/25/63 11:54

John O'Conner wrote:

> I've been told that I can no longer use pre-tags for code sample text.

This is a stupid decision. If you've had an outbreak of pointy-haired
boss, then you have my sympathy.


> My question is this: how can I duplicate the pre-tag functionality

Dead easy - just use <div class="pre" > and some CSS. There's nothing
at all magic about <pre>, it's just CSS effects.

If you examine the W3C's suggested default stylesheet, you'll see just
the CSS to use
http://www.w3.org/TR/CSS21/sample.html
The crucial bit would be
div.pre { white-space: pre; }

I suggest you might avoid the monospaced font in your replacement -
that way they'll probably not notice how closely you've cloned <pre>
8-)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация