同一行中的 22 个标题图像和导航 [英] Twenty twelve header image and navigation in same line

查看:18
本文介绍了同一行中的 22 个标题图像和导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将导航与标题图片放在 22 中的同一行中?现在导航菜单在图像上方,但我希望它们彼此相邻.有没有办法实现这一目标?谢谢!

How can you put the navigation in the same line as the header image in twenty twelve? Right now the navigation menu is above the image, but I would like them to be next to each other. Is there any way to achieve this? Thanks!

推荐答案

将position:relative"添加到#masthead:

Add "position:relative" to #masthead:

#masthead {position: relative;}

然后使用绝对位置定位导航:

then position your navigation with position absolute:

#site-navigation {
    position: absolute;
    bottom: 0; /* or top, if you prefer */
    right: 0;
}

这篇关于同一行中的 22 个标题图像和导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆