TinyPortal
Development => Support => Topic started by: lowandslow on December 26, 2006, 02:44:18 AM
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
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.dklassen.rcthost.com%2Fpics%2Fblocks.jpg&hash=4a1bcf25dba5147211400e0b36be794f55e9fe3c)
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
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>
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.nokonium.co.uk%2Fbits%2FBad-Santa1.png&hash=264c399c4d5b33660cc595f242b06743d27617c8)
150 px wide
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.nokonium.co.uk%2Fbits%2FBad-Santa2.png&hash=a91ac1f8a7b94e7bf2d7b26ad259f0ee6d24f402)
170 px wide
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.nokonium.co.uk%2Fbits%2FBad-Santa4.png&hash=7e035603856c509b78bc1ab8edbcd8eeb82e4668)
170 px wide
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.nokonium.co.uk%2Fbits%2FBad-Santa3.png&hash=c7104a175cf00884b1b983b33bfa87bdeef2a92f)
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>
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.nokonium.co.uk%2Fbits%2FBad-Santa5.png&hash=766e538f66515e073feeb7afb7efe03bb4ce490c)
170 px wide
Fantastic, thank you.
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