Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

How do you get HTML5 <nav> to center?

  • 2 trả lời
  • 4 gặp vấn đề này
  • 16 lượt xem
  • Trả lời mới nhất được viết bởi Dawn1

more options

nav { width:700px; margin-left:auto; margin-right:auto; } /* This centering only works in Google Chrome */

nav { width:700px; margin-left:auto; margin-right:auto; } /* This centering only works in Google Chrome */

Tất cả các câu trả lời (2)

more options

Is <nav> a block or an inline element?

See http://31o5.com/2010/04/18/wordpress-theme-in-html5/

Try nav { width:700px; text-align: center; }

See also http://dorward.me.uk/www/centre/

Được chỉnh sửa bởi cor-el vào

more options

nav { display:block; width:700px; margin-left:auto;

margin-right:auto; }

Yes! Adding display:block; centered it in Firefox. :)