Prashant Pandey Prashant Pandey - 3 years ago 187
CSS Question

Moving a div element left by a few pixels

I am a newbie in front-end development, so please bear with me if the question is too basic.
What I am trying to achieve is very similar to the following problem:

How do I move the search bar on SO's website to the left without affecting the other elements? I can't use the margin-left property since that would move the other elements as well. Is there any way to achieve this? Thanks!

Answer Source

You can use margin-left negative + margin-right positive;

margin-left: -10px;
margin-right: 10px;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download