• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

the Code tag

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed.
 
Michael Matola
whippersnapper
Ranch Hand
Posts: 1826
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic