I’m trying to align my search box to always be at the center of the page on my WordPress page.
You can see what I’m talking about at http://dev.replacementdustcollectorfilter.com/.
I put the box input box in it’s own div & class <div class="search-form-box">
, but I’m not sure what to do next.
Add
margin: 0 auto;
to your#search
div. This assigns a left and right margin ofauto
, which will center the div.See this answer and the docs at w3.