Jump to content
Sign in to follow this  
LoLoL

How to add a scrollbar to the Categories Box

Recommended Posts

Hello everyone,

 

I have 80 categories in my shop and NO sub-categories. I would like to add a scrollbar to the categories box to avoid the interminable box length.

 

Thank you in advance.

Share this post


Link to post
Share on other sites
Hello everyone,

 

I have 80 categories in my shop and NO sub-categories. I would like to add a scrollbar to the categories box to avoid the interminable box length.

 

Thank you in advance.

 

 

this should probably be in the Tips & Tricks section, but I accomplished this with my new site..

 

You can do it either one of two ways..

 

have a drop-down menu as on www.graveyardrecords.com/index.php

 

or do it using css like on www.graveyardrecords.com/2006/

 

The scrollbar looks nice in MSIE but generic in Firefox :(

 

in your stylesheet.css add

DIV.scrollbar {
width: 215px;
height: 210px;
position: absolute;
overflow:auto;
}

 

then in your includes/boxes/categories.php

 

find the following code and add in the <div class= "scrollbar" > and then add another </div> at the bottom right AFTER the last ?> but BEFORE the last

</td>
	  </tr>
<!-- categories_eof //-->

 

 

<!-- categories //-->

	  <tr>
		<td>
<div class= "scrollbar" >
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => BOX_HEADING_CATEGORIES
						  );
 new CategoriesBoxHeading($info_box_contents, true, false);

Share this post


Link to post
Share on other sites
this should probably be in the Tips & Tricks section, but I accomplished this with my new site..

 

You can do it either one of two ways..

 

have a drop-down menu as on www.graveyardrecords.com/index.php

 

or do it using css like on www.graveyardrecords.com/2006/

 

The scrollbar looks nice in MSIE but generic in Firefox :(

 

in your stylesheet.css add

DIV.scrollbar {
width: 215px;
height: 210px;
position: absolute;
overflow:auto;
}

 

then in your includes/boxes/categories.php

 

find the following code and add in the <div class= "scrollbar" > and then add another </div> at the bottom right AFTER the last ?> but BEFORE the last

</td>
	  </tr>
<!-- categories_eof //-->

<!-- categories //-->

	  <tr>
		<td>
<div class= "scrollbar" >
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => BOX_HEADING_CATEGORIES
						  );
 new CategoriesBoxHeading($info_box_contents, true, false);

 

Hello,

Thanks lots for your reply.

I tried your solution but it's messing up the following box which is "manufacturers" in my case. That box just disappears.

Any hint?

 

Thanks in advance.

Edited by LoLoL

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×