PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Forum code-font size  (Read 2068 times)

Haakon Birkeland

  • Master Member
  • ****
  • Posts: 681
  • XP Pro x64 SP2, (Win 7 Pro x64), Win 8 Pro x64
Forum code-font size
« on: November 10, 2009, 01:44:26 PM »

It might be my FireFox, but I find the font size displayed in code-tags are way small and crippled, making it very hard to read to read — even for a "young fart".

Does the forum have an option to increase the font-size?
Logged
Haakon 8o)

José Roca

  • Guru Member
  • *****
  • Posts: 3229
Re: Forum code-font size
« Reply #1 on: November 10, 2009, 03:15:21 PM »

No. The only way that I know is to modify the template. I did that in my forum.

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9015
  • Windows 10
    • PlanetSquires Software
Re: Forum code-font size
« Reply #2 on: November 10, 2009, 03:24:11 PM »

Can you remember which file in the template you modified? (and as a bonus, what font/size you decided to use).
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

José Roca

  • Guru Member
  • *****
  • Posts: 3229
Re: Forum code-font size
« Reply #3 on: November 10, 2009, 05:53:02 PM »

Style.css

Code: [Select]
/* A code block - maybe even PHP ;). */
.code
{
   font-family: "courier new", "times new roman", monospace;
   font-size: 100%;
   line-height: 1.3em;
   margin: 1px auto 1px auto;
   padding: 1px;
   width: 99%;
   /* Don't wrap its contents, and show scrollbars. */
   white-space: nowrap;
   overflow: auto;
   /* Stop after about 24 lines, and just show a scrollbar. */
   max-height: 24em;
}

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9015
  • Windows 10
    • PlanetSquires Software
Re: Forum code-font size
« Reply #4 on: November 10, 2009, 06:31:09 PM »

Thanks Jose,

I worked your styles into the existing styles and came up with the following (which seems to create code listings like on your site):

Code: [Select]
/* A code block - maybe even PHP ;). */
code
{
color: #000000;
background-color: #ffffff;
display: block;
font-family: "courier new", "times new roman", monospace;
        font-size: 100%;
line-height: 1.3em;
/* Put a nice border around it. */
border: 1px solid #000000;
margin: 1px auto 1px auto;
padding: 1px;
width: 99%;
overflow: auto;
white-space: nowrap;
/* Stop after about 24 lines, and just show a scrollbar. */
max-height: 24em;
}
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Haakon Birkeland

  • Master Member
  • ****
  • Posts: 681
  • XP Pro x64 SP2, (Win 7 Pro x64), Win 8 Pro x64
Re: Forum code-font size
« Reply #5 on: November 10, 2009, 06:36:42 PM »

Now, that's fully readable!

Seems even larger than the main forum text, but I guess some find that just jolly good. Now we only lack syntax highlighting. 8o)
Logged
Haakon 8o)

Rolf Brandt

  • Master Member
  • ****
  • Posts: 933
  • XP Pro SP3 - Vista - Win7
    • Taxi Dispatching Systems
Re: Forum code-font size
« Reply #6 on: November 10, 2009, 06:39:43 PM »

That suits my eyes much more!
Logged
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9015
  • Windows 10
    • PlanetSquires Software
Re: Forum code-font size
« Reply #7 on: November 11, 2009, 09:38:20 AM »

I updated to SMF 2 RC2 last night and the style of course got reset. I went back into the style.css and changed the code to match what I had before. It does not seem to have worked. I'll keep checking to see what I did wrong because I was liking the style yesterday that matched Jose's site.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Haakon Birkeland

  • Master Member
  • ****
  • Posts: 681
  • XP Pro x64 SP2, (Win 7 Pro x64), Win 8 Pro x64
Re: Forum code-font size
« Reply #8 on: November 11, 2009, 10:10:27 AM »

I noticed the font was crippled again when sitting in the Screen Resolution thread, but I kept it to myself in case it was my browser acting up ...
Logged
Haakon 8o)

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9015
  • Windows 10
    • PlanetSquires Software
Re: Forum code-font size
« Reply #9 on: November 11, 2009, 10:34:15 AM »

Yeah, it also screwed up my "Member Count" which I was able to fix.

Probably should have left well enough alone and waited to upgrade. Looks like everything is working okay now except for that Code block formatting. I'll get it working eventually.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Haakon Birkeland

  • Master Member
  • ****
  • Posts: 681
  • XP Pro x64 SP2, (Win 7 Pro x64), Win 8 Pro x64
Re: Forum code-font size
« Reply #10 on: November 11, 2009, 11:14:51 AM »

Member count ...
Yes, it has flashed my mind a couple of times that there is less stats visible than before you relaunched the forums.
Logged
Haakon 8o)