Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add a scrollbar to the Categories Box


LoLoL

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.

 

 

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);

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...