Centering top box over mobile

COwebmaster
COwebmaster used Ask the Experts™
on
On my site here, denverwinecellar.com, when viewed over mobile, the top bordered box should be centered. Here is the current css on that box:

@media only screen and (max-width: 480px) {
#top-elements .phone-number-padding {
  display:block;
  border: 1px solid;
  padding: 0 10px 0;
width: 250px;
	text-align: center;
	
}
}

Open in new window


What would I add in to center that?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Web Programmer/Technician
Commented:
Your style.css?ver=1.0 document has two separate definitions for #top-elements .phone-number-padding. The group of styles that begins on line 1293 assigns a float: right; property to this div. When that float property is removed, the best way to center a div is to give it a left and right margin of auto.

Author

Commented:
okay thanks Kim. I'll take a look at both styles and give that a try.

Author

Commented:
Thanks Kim!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial