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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 503
  • Total: 503

Need help with blocks and jpg images.

Started by lowandslow, December 26, 2006, 02:44:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lowandslow

Why when I put jpg's or any images in side blocks I get such large padding around the block borders? I've tried everything I can think of. Is there a way to tighten it up so there is no space?

Thanks


JPDeni

All of the blocks are in a <div> tag that includes padding of 4 or 5 pixels. It is set in the TPortalBlocks.template.php file. I'm not sure about how to tell you to fix it, though, because if you change it for one, you'd change it for all. I suppose you could

Copy TPortalBlocks.template.php into your alternate theme directory
Change the <div> tags in the copied file to remove the padding
Add any padding that you wanted to use for other blocks through <style= tags

Nokonium

From fiddling with one of my test sites I think that your images are narrower than the blocks that they are in.

I set up a basic BB/html block in a sidebar 180px wide, with an image in span tag

<span><img src="my url/my-image.jpg" /></span>


150 px wide


170 px wide


170 px wide



190 px wide

If you have the block title and border selected you will have some padding, which can vary according to the theme (see the two 170px images). If you remove the border and use just the title you will also lose the padding. If you then use a div tag with a center alignment you can center the image in within the width of the sidebar.

<div align="center"><img src="my url/my-image.jpg" /></div>


170 px wide

lowandslow


lowandslow

Still having some issues. I just can't seem to get rid of the space on top and on the bottom of the images inside the block. Also the space in between the images.  www.talkofthevillages.com

This website is proudly hosted on Crocweb Cloud Website Hosting.