[英]How to move navigation bar to more to the right to fit a logo left of the bar
我试图弄清楚如何将导航栏向右移动更多,以便我可以在导航文本的左侧添加一个徽标。 右浮动不起作用。
这是我的 CSS 代码。
#Main2 {
height:90px;
background-color:ebebeb;
}
ul {
margin:0;
padding:0;
}
li {
list-style-type:none;
float:left;
display:block;
width:150px;
height:90px;
text-align:center;
line-height:90px;
font-family:Comic Sans MS, cursive, sans-serif;
font-size:17px;
}
li a {
text-decoration:none;
color:black;
}
li:Hover {
background-color:pink;
background: -webkit-linear-gradient(#f1efef, #fcfbfb);
background: -moz-linear-gradient(#f1efef, #fcfbfb);
background: linear-gradient(#f1efef, #fcfbfb);
}
尝试添加 css 属性:
Position:relative;
Right:100px;//or however far you want
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.