Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change the space between categories


Kurre

Recommended Posts

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.

 

Link to comment
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... 🙂
 

Link to comment
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 commercial 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.

Link to comment
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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...