1

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.

Greg Dietrich
  • 96
  • 2
  • 9
  • Please add meaningful code and a problem description here. Don't just link to the site that needs fixing - otherwise, this question will lose any value to future visitors once the problem is solved. Posting a [Short, Self Contained, Correct Example (SSCCE)](http://www.sscce.org/) that demonstrates your problem would help you get better answers. For more info, see [Something on my web site doesn't work. Can I just paste a link to it?](http://meta.stackexchange.com/questions/125997/) Thanks! – j08691 Apr 05 '15 at 00:53

1 Answers1

3

Add margin: 0 auto; to your #search div. This assigns a left and right margin of auto, which will center the div.

See this answer and the docs at w3.

Community
  • 1
  • 1
pschueller
  • 4,362
  • 2
  • 27
  • 50