2

I have a simple code in Mangento and trying to change padding for li class current:

<div class="pages">
<strong>Page:</strong>
<ol>
<li class="current">1</li>
</ol>
</div>

I have tried these two but nothing is working. What am I doing wrong?

li .current{margin-left:5px;margin-right:5px;margin-top:5px;}
.current li {margin-left:5px;margin-right:5px;margin-top:5px;}
1
  • 4
    I'm voting to close this question as off-topic because it is not about the Magento platform, it's a CSS only question.
    – Ben Crook
    May 22, 2018 at 10:54

2 Answers 2

2

Try this:

CSS is trying to find child element with current class in your first li .current CSS and same in secound it is try to find child li :

li .current{margin-left:5px;margin-right:5px;margin-top:5px;}
.current li {margin-left:5px;margin-right:5px;margin-top:5px;}

So if you want to apply CSS on your li with current class, it should be like this:

li.current{margin-left:5px;margin-right:5px;margin-top:5px;}

2
li .current{margin-left:5px;margin-right:5px;margin-top:5px;}

In above line you have space between "li" and ".current". So you should have:

li.current{margin-left:5px;margin-right:5px;margin-top:5px;}
1
  • typo in the correct css. Should be li.current
    – jscar
    May 22, 2018 at 7:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.