aspose file tools*
The moose likes Ranch Office and the fly likes the Code tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "the Code tag" Watch "the Code tag" New topic
Author

the Code tag

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Is it just me, or is the code that shows upp when you use the [CODE] tag seem really small and hard to read. Is there a way to make the font larger and bold?
Thanks
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
No it's not just you.
There was a discussion of this same topic last week...but I think the resolution was "set your fonts bigger in your web browser."
Rob


Rob
SCJP 1.4
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
I always wanted to say this myself....untill one day I read a note in the SCJP forum that said (re someone else's post):
"When you use [ code ] tags, I can solve your problem in half the time."
and I think it was either you or Rob....
(Not sure.)
So from then on I started editing the posts without the tags and put tags around them.
Actually, even I feel the same. They make it hard to read.
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
You used to be able to put an HTML font tag inside the code tag to increase the font but that doesn't seem to work anymore. I think it would be worth hacking UBB to increase the default font size for the code tag.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Agreed.


"I'm not back." - Bill Harding, Twister
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1752
    
    2
My opinion is that it's best to leave things the way they are.
Arguments about altering the font size make the assumption that what you see on your screen is the same as what others see on their screens (or is sufficiently representative).
A quick check of the HTML leads me to believe that UBB implements the [ code] tag with the < pre> tag, which is commonly interpreted by browsers to mean "render the contents in a monospace font."
So hacking it wouldn't be just changing a default (because there's none), but choosing a font and/or size. What would you choose?
(I've recently switched to coding in proportional fonts, and I'm loving it.)
Also, the < pre> tag is also what allows the noncollapsing of whitespace (indentation). Do you want to deal with the various HTML hacks for indentation or have the page use style sheets so you can have both indenation and specific font size?
Why bother with all this when people can set their browsers and screen resolutions to view things how they want?
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974

Here is something to compare it to.
The problem is that there is a big discrepancy between the two sizes. If I make text big enough for the pre tag then it will be too big for the regular text. The answer, in my opinion, is to simply hack UBB so it inserts a < font size="+0" > tag inside the < pre > tag.
[ February 03, 2002: Message edited by: Thomas Paul ]
 
Consider Paul's rocket mass heater.
 
subject: the Code tag