TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,996
  • Total Topics: 21,327
  • Online today: 214
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 195
  • Total: 195

Different text sizes

Started by Sledge, June 30, 2006, 02:25:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sledge

Hi guys, me again.

I have this problem with the text in my blocks beng different sizes. Here, take a look:



Notice the difference in text sizes between the top posters and the calendar. All teh blocks from the calendar block down have this text size.

I've tried disabling the blocks above it to see if there is some script tht is causing it, but I can't nail it. Any ideas?

I'm using smf 1.0.7 and tp .75 (I know, I'm out of date).

IchBin

That would be the only way I could see that you would have different text sizes. If another block or something that has some html code or something missing causing the other code to go wacky. Disable everything. Then put them in one by one and see.

Nokonium

#2
It is a 'feature' ofÃ,  some TP blocks and itÃ,  isn't browser specific. It is still there in some blocks in the latest Alpha. Look to the 'Content' block to the left.

I haven't got a working 0.75 anymore but that Top Posters with totals isn't like the current Top PostersÃ,  SSI block.

To get all the text the same size, particularly for custom blocks you may need to include styles in your block code. Most preformatted blocks use class="smalltext".

This is how I've done it for my Content Block (TP Categories in TPportalBlocks.template) inserting <span> tags to set the text size.
// TPortal categories Nokonium version
function TPortal_catmenu()
{
Ã,  Ã,  Ã,  Ã,  global $context, $settings, $options , $scripturl;

Ã,  Ã,  if(isset($context['TPortal']['menu']) && !empty($context['TPortal']['menu'])){
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  echo '<div style="width: 100%; overflow: hidden; clip: rect(auto);">';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  foreach($context['TPortal']['menu'] as $cn){
Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  echo str_repeat("&nbsp;&nbsp;", ($cn['sub']+1));
Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  if((!isset($cn['icon']) || (isset($cn['icon']) && $cn['icon']=='')) && $cn['type']!='head' && $cn['type']!='spac'){
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  echo '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" />&nbsp;';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  }
Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  elseif(isset($cn['icon']) && $cn['icon']!='' && $cn['type']!='head' && $cn['type']!='spac'){
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  echo '<img alt="*" src="'.$cn['icon'].'" />&nbsp;';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  }

Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  switch($cn['type']){
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  case 'cats' :
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  echo '<span class="smalltext"><a href="'. $scripturl. '?cat='.$cn['IDtype'].'" ' , $cn['newlink']=='1' ? 'target="_blank"' : '' , '>'.$cn['name'].'</a></span><br />';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  break;
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  case 'arti' :
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  echo '<span class="smalltext"><a href="'. $scripturl. '?page='.$cn['IDtype'].'"' , $cn['newlink']=='1' ? 'target="_blank"' : '' , '>'.$cn['name'].'</a></span><br />';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  break;
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  case 'link' :
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  echo '<span class="smalltext"><a href="'.$cn['IDtype'].'"' , $cn['newlink']=='1' ? 'target="_blank"' : '' , '>'.$cn['name'].'</a></span><br />';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  break;
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  case 'head' :
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  echo '<span class="smalltext" style="font-variant: small-caps; font-weight: bold;">'.$cn['IDtype'].'</span><br />';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  break;
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  case 'spac' :
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  echo '<br />';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  break;
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  default :
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  echo '<a href="'.$cn['IDtype'].'"' , $cn['newlink']=='1' ? 'target="_blank"' : '' , '>'.$cn['name'].'</a><br />';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  break;
Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  }
Ã,  Ã,  Ã,  Ã,  }
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  echo '</div>';
Ã,  Ã,  }
}


Don't use this block code, it is from an Alpha version and is for illustration of the principle only.








This website is proudly hosted on Crocweb Cloud Website Hosting.