• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

the Code tag

 
ranger
Posts: 17344
11
Mac IntelliJ IDE 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
 
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
 
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
 
mister krabs
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.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed.
 
whippersnapper
Posts: 1843
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
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 ]
 
Not so fast naughty spawn! I want you to know about
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!