Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 [code] and trick for <pre> tags
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

blackinwhite
Average Member

Turkey
657 Posts

Posted - 10 November 2001 :  04:48:04  Show Profile
it's not a mod at all but it's style trick.

for those who are using CSS, using

pre {overflow-x:auto;width:500px;}

for pre tags can make things easier.

500px means that it won't be longer than 500px, if it's longer than 500px, a horizontal scrolling just for pre tags.


____
"I am a legal alien"

heptite
Average Member

USA
547 Posts

Posted - 10 November 2001 :  05:35:38  Show Profile  Visit heptite's Homepage  Send heptite an ICQ Message  Send heptite a Yahoo! Message
Unfortunatly just changing the .css won't fix a problem that I see after implementing it.

Sure you get a horizontal scroll bar, but the text that caused the scroll bar to appear isn't viewable.

Here's an example on one of my forums.

http://www.journaldesigns.com/forum/topic.asp?TOPIC_ID=16

This is what is between [.code] and [./code]


Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] The field 'FORUM_MY_CONFIG.THEME_ID' cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field. /forum/my_edit_config.asp, line 91


Sue

Additional support files - http://www.snitz.info
Go to Top of Page

heptite
Average Member

USA
547 Posts

Posted - 10 November 2001 :  06:06:20  Show Profile  Visit heptite's Homepage  Send heptite an ICQ Message  Send heptite a Yahoo! Message
But if you make a slight change to the .css:

pre {overflow-x:auto;width:500px; height:auto;}

Then it works.

Additional support files - http://www.snitz.info
Go to Top of Page

Morten
Junior Member

Denmark
251 Posts

Posted - 10 November 2001 :  10:34:53  Show Profile
Hi blackinwhite!

This looks great! - but where do I put this piece of code ? - I have tryed in the style-tags of inc_top.asp but without any results. Could you give an example ?

Best from
Morten

Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 10 November 2001 :  11:55:41  Show Profile
I use stylesheets, and it works fine for me.

I don't have any demo on the net, but this screenshot can give you an idea.



____
"I am a legal alien"
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 10 November 2001 :  12:08:21  Show Profile  Visit dayve's Homepage
well, you can add this directly in your inc_top.asp like so:


<style>
pre {overflow-x:auto;width:500px;}
</style>


or edit your inc_functions.asp like this:


fString = replace(fString, "<pre style='overflow-x:auto;width:500px; height:auto' id=code><font face=courier size=" & strDefaultFontSize & " id=code>","[ code]", 1, -1, 1)


fString = doCode(fString, "[ code]", "[ /code]", "<pre style='overflow-x:auto;width:500px; height:auto' id=code><font face=courier size=" & strDefaultFontSize & " id=code>", "</font id=code></pre id=code>")

I haven't tested this though but it should work...

Dayve


Edited by - dayve on 10 November 2001 12:11:47
Go to Top of Page

Morten
Junior Member

Denmark
251 Posts

Posted - 10 November 2001 :  15:29:34  Show Profile
Thanks for your help. But still nothing here that works. Its not my browser becaurse I see it work at the link:

http://www.journaldesigns.com/forum/topic.asp?TOPIC_ID=16

I have tryed for both pictures and text but it all just runs wide. I have also tryed to edit the inc_functions.asp like dayve suggested in his posting. And both places at the same time - nothing happens! - what am I doing wrong, or does anybody else have this problem also ?

Best from
Morten

Go to Top of Page

winterkills
Starting Member

14 Posts

Posted - 23 November 2001 :  13:09:29  Show Profile
Try "pre {overflow-x:auto; width:500px; height:auto}" instead, perhaps? You may not need the final semicolon...

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07