Centrar menu principal
-
Hola compañeros,
me estoy volviendo loco, como podria centrar el menu de mi tema? os dejo el codigo CSS a ver si echandole un vistazo se os ocurre algo.
/*----------------------------------------------------------- Theme Name: Photo Version: 1.1 Description: Premium WordPress theme by WPExplorer Author: WPExplorer Author URI: http://themeforest.net/user/WPExplorer/?ref=wpexplorer Designed & Developed by WPExplorer Theme URI: http://themeforest.net/user/WPExplorer/portfolio License: GNU General Public License version 3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html Tags: light, flexible-width, custom-background, threaded-comments, custom-menu, featured-images, full-width-template, theme-options, translation-ready /* Reset ================================================== */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block } body { line-height: 1 } ol, ul { list-style: none } blockquote, q { quotes: none } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } /* Body & Main ================================================== */ body { background: #ddd; nowhitespace: afterproperty; font: 15px/1.8 Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif; color: #666; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; } body a { color: #f3472a } body a:hover { text-decoration: underline; color: #ce280b; } /*set max img width*/ img { max-width: 100% } /* Main Wraps ================================================== */ /*main*/ #wrap { margin: 40px auto; width: 1000px; background-color: rgba(255, 255, 255, 0.00); } #main-content { padding: 40px; text-align: center } .container { background: #fff; padding: 30px; } /* Commons ================================================== */ /*clear floats*/ .remove-margin { margin-right: 0 !important } .clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } .clear { clear: both } /*blockquote*/ blockquote { position: relative; margin: 30px 20px; padding-left: 25px; font-style: italic; color: #999; font-size: 1.231em; border-left: 4px solid #f3472a; } blockquote p:last-child { margin: 0 } /*preformatted text*/ pre { background: #fff url("images/pre-bg.png") repeat; margin: 40px 0px; padding: 25px 20px; line-height: 25px; border: 1px solid #ddd; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; } /*address*/ address { letter-spacing: 1px; margin: 20px 0; } /*page featured image*/ #page-featured-img { position: relative; margin-bottom: 25px; } #page-featured-img img { display: block; width: 100%; } /* Lists ================================================== */ .entry ul { margin: 30px 0 30px 20px } .entry ol { margin: 30px 0 30px 25px } .entry ul { list-style: disc } .entry ol { list-style: decimal } .entry ul li, .entry ol li { margin: 0 0 5px } /* Typography ================================================== */ h1, h2, h3, h4, h5, h6 { font-weight: 400; font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif; } h1, h2, h3, h4, h5, h6 { color: #111 } h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: #111 } h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { color: #f3472a; text-decoration: none; } .entry h2, .entry h3, .entry h4, .entry h5, .entry h6 { margin: 40px 0 20px } h1 { font-size: 1.846em; margin: 0 0 20px; } h2 { font-size: 1.385em } h3 { font-size: 1.231em } h4 { font-size: 1.077em } h5 { font-size: 0.923em } h6 { font-size: 0.769em } p { margin: 0 0 20px } .entry p:last-child { margin: 0 } p img { margin: 0 } p.lead { font-size: 1.615em; line-height: 27px; color: #777; } em { font-style: italic } strong { font-weight: bold } small { font-size: 80% } hr { border: solid rgba(0, 0, 0, 0.2); border-width: 1px 0 0; clear: both; margin: 10px 0 30px; height: 0; } p a, p a:visited { line-height: inherit } a:link { text-decoration: none } a:focus { outline: 0 } a { outline: 0 } p a, p a:visited { line-height: inherit } a:link { text-decoration: none } a:focus { outline: 0 } /* Headings ================================================== */ /*page heading*/ #page-heading { margin: 0 0 30px } #page-heading h1, #page-heading h2 { margin: 0; font-size: 2.154em; line-height: 1.3em; } #page-heading:after { content: ""; display: block; height: 1px; width: 25px; border-bottom: 1px dotted #ccc; margin: 20px 0; } /* Header ================================================== */ /*header*/ #header { position: relative; padding: 40px 0; } /*logo*/ #logo { text-align: center } #logo h1 a, #logo h2 a { font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif; padding: 0px; margin: 0px; text-decoration: none; color: #000; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } #logo img { max-width: 100% } #logo h1, #logo h2 { font-weight: bold; font-size: 2.154em; margin: 0; line-height: 1em; } #logo p { margin: 10px 0 0; font-size: 0.846em; } /*social*/ #header-social { position: absolute; top: 50%; margin-top: -16px; right: 40px; } #header-social li { float: left; display: block; margin-left: 5px; margin-bottom: 5px; } #header-social a, #header-social img { display: block } #header-social img { opacity: 0.8 } #header-social img:hover { opacity: 1 } /* Main Navigation ================================================== */ /*hide responsive nav*/ #top-bar .selector, #navigation .selector { display: none } /*core*/ .sf-menu, .sf-menu * { margin: 0; padding: 0; list-style: none; } .sf-menu { line-height: 1.0 } .sf-menu ul { position: absolute; top: -999em; width: 180px; } .sf-menu ul li { width: 100% } .sf-menu li:hover { visibility: inherit } .sf-menu li { float: center; position: relative; } .sf-menu a { display: inline-block; position: relative; } .sf-menu li:hover ul, .sf-menu li.sfHover ul { left: 0px; top: 30px; z-index: 99; } ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { top: -999em } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 180px; top: 1px; } /*styling*/ #navigation-wrap { position: relative; display: inline-block; } #navigation { position: relative; height: 55px; margin: 0 40px; border-top: 1px dotted #ccc; border-bottom: 1px dotted #ccc; } #navigation .sf-menu > li:hover > ul, .sf-menu li.sfHover > ul { top: 55px } #navigation ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul, ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 200px; top: 0; } #navigation .sf-menu a { font-size: 1.000em; height: 55px; line-height: 55px; color: #000; text-decoration: none; } #navigation .sf-menu > li > a { border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; } #navigation .sf-menu li { float: left; position: relative; } #navigation .sf-menu > li { background: url("images/dash.png") right center no-repeat; margin-right: 20px; padding-right: 20px; } #navigation .sf-menu > li:last-child { background: none; margin: 0; padding: 0; } #navigation .sf-menu > li > a:hover { color: #999 } #navigation .sf-menu > .current-menu-item > a { color: #f3472a } #navigation .sf-menu > li.sfHover > a { color: #999 } /*drop-down styles*/ #navigation .sf-menu ul { position: absolute; nowhitespace: afterproperty; top: -999em; width: 200px; z-index: 9999; left: 0; border: 1px solid #ddd; box-shadow: 0 0 8px rgba(0,0,0,0.08); } #navigation .sf-menu ul > li:last-child { -webkit-border-bottom-right-radius: 2px; -webkit-border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -moz-border-radius-bottomleft: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; } #navigation .sf-menu ul li { background: #fff; border-bottom: 1px solid rgba(0,0,0,0.05); } #navigation .sf-menu ul li:first-child { border-top: 0 } #navigation .sf-menu ul li:last-child { border-bottom: 0 } #navigation .sf-menu ul a { display: inline-block; padding: 10px; color: #666; height: auto; margin: 0px; border: 0px; line-height: 1.8em; font-size: 0.923em; text-shadow: none; } #navigation .sf-menu ul li > a:hover { color: #f3472a; background: #f9f9f9; } /* Homepage ================================================== */ #home-slider { margin-bottom: 40px } #homepage-title { font-size: 1.000em; background: url("images/heading-bg.png") center repeat-x; margin-bottom: 40px; text-align: center; font-weight: normal; text-transform: uppercase; } #homepage-title span { background: #fff; padding: 0 15px; display: inline-block; } /* Entries ================================================== */ #entries-wrap { margin-right: -40px !important } .single-entry { overflow: hidden; float: left; width: 280px; margin-bottom: 40px; margin-right: 40px; } .single-entry p { font-size: 1.077em } .single-entry p:last-child { margin: 0 } .single-entry h3 { margin: 0 0 20px; padding-bottom: 10px; border-bottom: 1px solid #eee; font-size: 1.231em; line-height: 1.4em; font-weight: 600; } .single-entry img { box-shadow: #000 0em 0em 0em } .single-entry img:hover { opacity: 0.9 } /*thumbnail*/ .single-entry-thumbnail img { display: block; width: 100%; margin-bottom: 20px; } .single-entry-thumbnail a, .single-entry-thumbnail img { display: block } /*categories*/ .entry-cats { margin-bottom: 4px } .entry-cats a { font-size: 0.846em; color: #666; } /* Posts ================================================== */ /*header*/ #post-header { margin-bottom: 20px } #post-header:after { content: ""; display: block; height: 1px; width: 25px; border-bottom: 1px dotted #ccc; margin: 20px 0; } #post-header h1 { margin: 0 0 5px; font-size: 2.154em; line-height: 1.3em; } .single-post .meta { font-size: 0.923em } .single-post .meta li { display: inline; margin-right: 5px; margin-right: 10px; } .single-post .meta strong { font-weight: normal; color: #000; } .single-post .meta li:last-child { margin-right: 0; padding-right: 0; background: none; } /*post media*/ #single-media { margin-right: -20px } #single-media li, #single-media a { display: block; float: left; } #single-media li { margin-right: 20px; margin-bottom: 20px; } #single-media img { display: block; padding: 5px; border: 1px solid #eee; } /*post audio*/ #single-post-audio-wrap { margin: 0 0 30px } #single-post-audio-wrap img { display: block; width: 100%; } /*tags*/ #post-tags { margin-top: 30px } #post-tags a { background: #f3472a; display: block; float: right; margin-right: 5px; margin-bottom: 5px; border-radius: 2px; color: #fff; font-size: 0.846em; padding: 2px 6px; } #post-tags a:hover { background: #f5634a; color: #fff; text-decoration: none; } /*related*/ #related-posts { margin: 40px 0 0 } #related-posts h2 { font-size: 1.000em; background: url("images/heading-bg.png") center repeat-x; margin-bottom: 40px; text-align: center; font-weight: normal; } #related-posts h2 span { background: #fff; padding: 0 15px; display: inline-block; text-transform: uppercase; } /* Pagination ================================================== */ .page-pagination { margin: 20px 0 -25px; padding: 20px 0 0; border-top: 1px dotted #ccc; overflow: hidden; } .page-of-page span.inner { padding: 0 10px } .page-of-page, .page-pagination a, .page-pagination span.outer { font-size: 0.769em; font-weight: normal; line-height: 25px; height: 25px; text-align: center; margin-right: 5px; margin-bottom: 5px; display: block; float: left; color: #666; background: #f9f9f9; -moz-box-sizing: border-box; } .page-pagination a, .page-pagination span.outer { width: 25px } .page-pagination a:hover, .page-pagination span.current { color: #fff; background: #f3472a; text-decoration: none; } /* Footer ================================================== */ /*footer main*/ #footer { font-size: 1.000em; position: relative; border-top: 1px dotted #ccc; padding: 40px; margin: 0 40px; } /*copyright*/ #copyright { text-align: center; font-size: 0.846em; } /* Search ================================================== */ /*main*/ input[type="search"] { background: url("./images/search.png") no-repeat scroll 96% center #fff; border: 1px solid #ddd; color: #666; font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif; font-size: 0.923em; color: #9da1a9; padding: 10px 16px 10px 7px; width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-appearance: none; outline: none; } #footer input[type="search"] { background-image: url("./images/search-light.png") } input[type="search"]::-webkit-search-decoration { display: none } input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none } /* Forms / Inputs / Buttons ================================================== */ /*inputs*/ input[type="text"], input[type="password"] { height: 30px; line-height: 30px; } input[type="text"], input[type="password"], textarea { font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif; background: #fff; border: 1px solid #ddd; color: #666; display: block; font-size: 0.923em; margin-left: 0; padding: 0 10px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; max-width: 100%; -webkit-appearance: none; } textarea { width: 100%; padding: 10px; line-height: 1.5em; } input[type="text"], input[type="password"] { width: 200px } input[type="text"]:focus, input[type="password"]:focus, textarea:focus { outline: none; border-color: #ccc; } /*contact form 7*/ .entry .wpcf7-form { margin-top: 40px } .wpcf7-form p { font-size: 0.846em; color: #999; text-transform: uppercase; } .entry button, .entry input[type="button"], .entry input[type="submit"], #commentsbox input[type="submit"] { position: relative; display: block; padding: 0 15px; height: 35px; line-height: 35px; outline: none; border: none; background: #f3472a; color: #fff; font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif; -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; font-size: 1.000em; cursor: pointer; -webkit-appearance: none !important; } .entry button:hover, .entry input[type="button"]:hover, .entry input[type="submit"]:hover, #commentsbox input[type="submit"]:hover { background: #f5634a; color: #fff; } .entry button:active, .entry input[type="button"]:active, .entry input[type="submit"]:active, #commentsbox input[type="submit"]:active { top: 1px } /* Comments ================================================== */ #commentsbox { margin-top: 40px } h3.comments-title { font-size: 1.077em; background: url("images/heading-bg.png") center repeat-x; margin-bottom: 40px; text-align: center; } h3.comments-title span { background: #fff; padding: 0 15px; display: inline-block; } .comment-details ul { margin: 0 } .comment-details ul li { border-bottom: 1px solid rgba(0, 0, 0, 0.1); padding-bottom: 8px; padding-top: 8px; } .comment-details ul li:first-child { border-top: 1px solid rgba(0, 0, 0, 0.1) } .commentlist { margin: 0 } .commentlist li { list-style: none; margin: 0; } .children li.depth-2 { margin: 0 0 0px 65px } .children li.depth-3 { margin: 0 0 0px 65px } .children li.depth-4 { margin: 0 0 0px 65px } .children li.depth-5 { margin: 0 0 0px 65px } .children li.depth-6 { margin: 0 0 0px 65px } .children li.depth-7 { margin: 0 0 0px 65px } .children li.depth-8 { margin: 0 0 0px 65px } .children li.depth-9 { margin: 0 0 0px 65px } .children li.depth-10 { margin: 0 0 0px 65px } .comment-body { margin-bottom: 25px } .comment-details { position: relative; margin-left: 80px; background: #f9f9f9; padding: 20px; } .comment-avatar { position: absolute; left: -80px; top: 0; border: 5px solid #eee; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; } .comment-avatar img { display: block } .comment-author { color: #111 } .comment-author, .comment-author .author a:link, .comment-author .author a:visited { font-weight: 600 } .comment-content { margin-top: 5px } .comment-content p:last-child { margin: 0 } .comment-date { font-size: 0.846em; font-weight: normal; } .comment-date a { color: #888 } .comment-reply-link { font-size: 0.846em; color: #888; } .comment-reply-link:hover { text-decoration: none } .comment-reply-link:before { content: "\b7\a0" } #respond { font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif; font-size: 1.000em; } #cancel-comment-reply-link { display: block; position: absolute; font-size: 0.846em; font-weight: 600; margin: 0 0 10px; color: #C30; } .comment-reply-link:hover, #cancel-comment-reply-link:hover { color: #000 } .commentlist .children { margin: 0 } #comments-title { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; padding-top: 10px; padding-bottom: 10px; margin-top: 30px; background: #fbfbfb; text-align: center; color: #222; } #comments_wrap { margin-top: 15px } #comments-logged-in { margin-bottom: 30px; margin-top: 10px; font-size: 1.000em; } #log-out { float: right; margin-top: -56px; } .form-submit { margin-bottom: 0; height: 55px; } h3#reply-title { font-size: 1.077em; background: url("images/heading-bg.png") center repeat-x; margin: 40px 0 20px; text-align: center; } h3#reply-title span { background: #fff; padding: 0 15px; display: inline-block; } .children #commentform textarea { width: 95.6% } #commentform label { float: left; display: block; font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif; font-size: 1.000em; font-weight: normal; width: 70px; } #commentsbox span.required { color: #C30; font-size: 9px; } #commentform input { margin-top: 0 !important } #commentform input#author, #commentform input#email, #commentform input#url { font-size: 0.923em; width: 30%; max-width: 240px; margin-top: 10px; } #commentform textarea { font-size: 0.923em; width: 100%; margin-top: 10px; } #comment-left { float: left; width: 160px; padding-right: 35px; } #comment-right { float: left; width: 445px; } /* 404 Page ================================================== */ #error-page-title { font-size: 80px; text-align: center; font-weight: bold; background: none; line-height: 1em; border: none; margin: 0 0 10px; color: #000; } #error-page-title span { margin-right: 7px } #error-page-text { text-align: center; font-size: 1.231em; } /* WordPress Styles ================================================== */ /*aligns*/ .aligncenter { display: block; margin: 0 auto; } .alignright { float: right; margin: 0 0 10px 20px; } .alignleft { float: left; margin: 0 20px 10px 0; } /*floats*/ .floatleft { float: left } .floatright { float: right } /*text style*/ .textcenter { text-align: center } .textright { text-align: right } .textleft { text-align: left } /*captions*/ .wp-caption { max-width: 100% !important } .wp-caption { text-align: center; margin: 25px 0; } .wp-caption img { margin: 0; border: 0 none; max-width: 100%; display: block; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .wp-caption p.wp-caption-text { font-size: 1.000em; text-transform: uppercase; padding: 20px; margin: 0; color: #000; border-bottom: 1px dotted #ccc; } /*smiley reset*/ .wp-smiley { margin: 0 !important; max-height: 1em; } /*blockquote*/ blockquote.left { margin-right: 20px; text-align: right; margin-left: 0; width: 33%; float: left; } blockquote.right { margin-left: 20px; text-align: left; margin-right: 0; width: 33%; float: right; } /*img attachment*/ #img-attch-page { text-align: center; overflow: hidden; } #img-attch-page img { display: block; margin: 0 auto; max-width: 100%; } /*other*/ .bypostauthor { } .sticky { } .gallery-caption { }
Muchas gracias
Viendo 3 respuestas - de la 1 a la 3 (de un total de 3)
Viendo 3 respuestas - de la 1 a la 3 (de un total de 3)
- El debate ‘Centrar menu principal’ está cerrado a nuevas respuestas.