将菜单,社交媒体和自定义行添加到标题中

时间:2014-06-19 13:53:32

标签: menu navigation

我正在尝试自定义标题,使其看起来更像是此网站http://makingmagique.com上的标题。我喜欢它是固定和半透明的。也喜欢菜单旁边的“徽标”和社交媒体按钮都在右侧。如果您可以弄清楚如何在底部添加自定义行,则可以获得奖励积分。 ;)任何想法如何做到这一点?我目前正在使用Twenty Twelve Wordpress,但我对其他主题持开放态度。

任何人都知道如何自定义这样的标题?我的网站是http://beyondblessedblog.com

1 个答案:

答案 0 :(得分:0)

以下是标题的相关部分(我直接从makingmagique.com复制它们)。如果您还没有,则应熟悉您的浏览器developer tools

HTML:

<div id="header-container">
    <div id="header">
        <h1 id="site-title">
            ... <!-- title/logo -->
        </h1>

        <div id="after-header">
            <div class="menu-container" id="primary-menu">
                ... <!-- navigation menus -->
            </div>

            <div class="search" id="search-1">
                ... <!-- search box -->
            </div>

            <div id="social">
                ... <!-- social links -->
            </div>
        </div>

        <div class="clear"></div>
    </div>
    <div class="divider"></div>  <!-- this is the colored line at the bottom -->
</div>

CSS:

#header-container {
  background: none repeat scroll 0 0 rgba(255, 255, 255, 0.9);
  position: fixed;
  width: 100%;
  z-index: 10000;
}
#header {
  margin: 30px auto 0;
  width: 1020px;
}

/* title/logo */
#site-title {
  float: left;
  height: 41px;
  margin-right: 60px;
  position: relative;
  width: 265px;
  z-index: 300;
}

#after-header {
  float: left;
  height: 17px;
  margin-bottom: 2px;
  padding-top: 26px;
  width: 695px;
}

/* navigation menus */
#primary-menu {
  display: inline-block;
  float: left;
}

/* search box */
#after-header .search {
  display: inline-block;
  float: left;
  line-height: normal;
}

/* social links */
#social {
  display: inline-block;
  float: right;
  font-size: 13px;
  line-height: normal;
  margin: 0;
  padding: 2px 0 0;
  text-align: right;
}

.clear {
  clear: both;
}

/* this is the colored line at the bottom */
.divider {
  background: linear-gradient(to right, #c6e0e5 0%, #ffcdce 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
  height: 5px;
  position: relative;
  width: 100%;
  z-index: 200;
}

P.S。菜单动画和悬停状态为another kettle of fish