Jump to content
Kurre

Change the space between categories

Recommended Posts

Posted (edited)

osCommerce 2.3.4.1. CE Bootstrap

How do I change the space between the categories in the categorie menu ? It is to big now..

 

 

kategorier2.jpg

Edited by Kurre

Share this post


Link to post
Share on other sites
Posted (edited)

Be careful if you're reducing margins or padding when displaying on a touch-screen device like a phone. There's deliberately extra space there so that people with fat fingers won't accidentally tap the wrong entry. Reduce it too much, and you'll get lots of complaints that your site is unusable.

 

Edited by MrPhil
link to posting explaining sizes

If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozenpatches or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

Add this code to your user.css and play with the figures:

 

#columnLeft .nav>li>a {
    position: relative;
    display: block;
    padding: 2px 15px;
}

I did not make it up, but I had the same problem when I still used the left nav panel. Someone added this for me... 🙂
 


Not too experienced, but very willing to learn.

Share this post


Link to post
Share on other sites

By all means do the below:

14 minutes ago, René H4 said:

Add this code to your user.css and play with the figures:


#columnLeft .nav>li>a {
    position: relative;
    display: block;
    padding: 2px 15px;
}

I did not make it up, but I had the same problem when I still used the left nav panel. Someone added this for me... 🙂
 

But it comes with the caveat that it will affect all nav li a  in the left column and as MrPhil linked to I would only do it for desktop devices or you may suffer an accessibility penalty from search engines.

To target only desktop/large screen devices use below which is the above code but amended with a media query.

@media (min-width: 992px) {
  #columnLeft .nav>li>a {
      position: relative;
      display: block;
      padding: 2px 15px;
  }
}

 


If it still don't work, hit it again!

Senior PHP Dev with 18+ years of experience for hire, all requirements considered, see profile for more information.

Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here.

Share this post


Link to post
Share on other sites

@Kurre

So it does not affect every where you are best to create your own like here line 40 in /includes/modules/boxes/bm_categories.php  "mycatagory"

$OSCOM_CategoryTree->setParentGroupString('<ul class="nav nav-pills nav-stacked" id="mycatagory">', '</ul>', true);

The change #columnLeft to #mycatagory in user.css

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

×