TinyPortal

Development => Block Codes => Topic started by: Skhilled on September 03, 2011, 07:50:55 PM

Title: BBC Block Height
Post by: Skhilled on September 03, 2011, 07:50:55 PM
Is there a way to limit a BBC block's height? I have some articles I'm adding to that type of block but instead of scroll bars appearing after adding about 5 of them it just gets longer and longer.
Title: Re: BBC Block Height
Post by: WillyP on September 04, 2011, 12:23:26 AM
You could do something with css,take a look at the block and get the id of the block and add something like height: 200px and overflow: scroll. Or something like that. Post a link and I'll be more specific if you want.
Title: Re: BBC Block Height
Post by: Skhilled on September 04, 2011, 01:14:59 AM
Hmmm, I thought so. I saw a post dated back to 2007, I think, that was sort of similar but I didn't think it would work for BBC blocks.

http:www/skhilled.com/docs

2nd block down on the left.
Title: Re: BBC Block Height
Post by: WillyP on September 06, 2011, 04:15:16 PM
Ok, try this in your css file:

#block25 .blockbody {
    overflow: scroll !important;
    height: 100px;
}
Title: Re: BBC Block Height
Post by: Skhilled on September 07, 2011, 01:49:44 PM
Excellent! Thank you, kindly, sir! It worked. I figured there was a way to single out a block and add custom edits to it but didn't know how. Not only have you solved my problem but you've taught me how to do it for other blocks.  8)

EDIT: Only one problem. How do I get rid of the horizontal scroll bar?

No matter how wide I set the panels and blocks it still shows unlike the other blocks. I intentionally left it extra wide just so you can see.

http://www.skhilled.com/docs
Title: Re: BBC Block Height
Post by: IchBin on September 07, 2011, 08:15:19 PM
You may want to do max-height: 100px; with overflow: auto.

overflow: scroll is why the scrolls are showing regardless of content.
Title: Re: BBC Block Height
Post by: WillyP on September 07, 2011, 09:16:12 PM
True but if you do make sure you add some padding for IE or the bottom gets cut off, IIRC.
Title: Re: BBC Block Height
Post by: Skhilled on September 08, 2011, 01:37:39 PM
Quote from: IchBinâ,,¢ on September 07, 2011, 08:15:19 PM
You may want to do max-height: 100px; with overflow: auto.

overflow: scroll is why the scrolls are showing regardless of content.

Worked like a charm. Thanks. :)

Quote from: WillyP on September 07, 2011, 09:16:12 PM
True but if you do make sure you add some padding for IE or the bottom gets cut off, IIRC.

I checked it with IE, Chrome, and Opera and it looks ok without it but I'm on an older monitor. How does it look to you?
Title: Re: BBC Block Height
Post by: WillyP on September 14, 2011, 02:12:10 AM
Looks fine to me I must have been thinking of something else. Marked this solved.
Title: Re: BBC Block Height
Post by: Skhilled on September 14, 2011, 02:17:23 PM
Thanks for all of your help, WillyP. :)