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

closed as off-topic by Ben Crook, Manoj Deswal, Piyush, Jai, Manashvi Birla May 22 '18 at 11:38

  • This question does not appear to be about the Magento e-Commerce platform within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 '18 at 10:54
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;}
  • typo in the correct css. Should be li.current – jscar May 22 '18 at 7:22

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