Blocks and scroll bars

Blocks and scroll bars

by Anu Laitakari -
Number of replies: 5

Hi!

Hopefully someone can help me. I am using the Rocket theme (latest version) on my 2.3.1 installation. I know this isn't strictly related to the Rocket theme but all themes with fixed width.

I am hoping that someone would have the answer to how to get rid of the annoying scroll bars that appear on the side blocks. The horizontal ones I can fix by changing the size of the content (if it is an image) but what about the vertical ones that just have text?


Thanks, Anu

Attachment block with scroll bar.PNG
Average of ratings: -
In reply to Anu Laitakari

Re: Blocks and scroll bars

by Miriam Laidlaw -
Picture of Plugin developers

Hmmm not sure why that's happening.

Try adding this CSS to your theme

.blocks {
overflow: hidden;
}


Though that looks like it's happening to only a specific section of the block. If you can figure out which div is getting the scrollbar there, you may have to ammend the above statement to also include that div class.

In reply to Anu Laitakari

Re: Blocks and scroll bars

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

This is not easy to fix without seeing the block itself. Would it be possible to send both Miriam and myself a link to your site so we can inspect the block and get a better idea of the code needed to fix this. It also helps us when styling a theme too, as we don't always have the same RSS feeds, weather reports, whatever, on our test sites.

Thanks

Mary

In reply to Mary Evans

Re: Blocks and scroll bars

by Albert Leatherman -

Hi Miriam and Mary, I tried adding

.blocks {

overflow: hidden;
}

to the custom CSS in Evolve-D theme to eliminate the scroll bar that appears at the bottom of the Word of the Day block but that didn't work.  Nor did adding the same code to custom.css or evolved.css in /theme/evolved/style. I was sure to purge the theme cache each time.

The scroll bar appears because the mp3 player is too wide for the block. Please see the attached image. Any ideas on how to eliminate the scroll bar or, even better, make the mp3 player less wide? Thanks.




In reply to Albert Leatherman

Re: Blocks and scroll bars

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

The standard class used for blocks is '.block' not '.blocks' for example

<div id="inst38" class="block_course_list  block list_block" data-dockable="1" aria-labelledby="instance-38-header" data-instanceid="38" data-block="course_list" role="navigation">

but please also see the second part of Miriam's post that gave that code

Though that looks like it's happening to only a specific section of the block. If you can figure out which div is getting the scrollbar there, you may have to ammend the above statement to also include that div class.

You may need to use something like firebug to actually identify the area that is 'overflowing'.


Richard


In reply to Richard Oelmann

Re: Blocks and scroll bars

by Albert Leatherman -

Thanks a lot for the reply, Richard. I think I identified the div in question. (I've attached pics of the block and the corresponding code.) However, I'm not sure how to implement Miriam's advice on how to use this div info to remove the scroll bar, as I'm a relative novice. Do you have any advice on that? Or, even better, could I somehow insert some code to restrict the width of the media player? That would eliminate the scroll bar. Thanks.