-2

There is an error on my website. I want to display my login links at the top of my website but that doesn't work in Google Chrome nor Safari, but it does in Firefox. I believe this has something to do with floating, but adding a clear:both div before the form does not work. Lalalalalala is the string I use as temporary replacement for the actual links.

This is the correct display: http://imgur.com/fh71eBd,VIRHRYz#0

This is the wrong display: http://imgur.com/fh71eBd,VIRHRYz#1

My website is: www.rajivmanichand.nl

4

1 回答 1

0

好吧,很容易解决您针对错误元素的问题

添加float:left;img#logo 并添加clear:both;nav

的CSS:

img#logo{
display: inline-block;
float: left;
}
div#loginsection {
width: 300px;
height: 44px;
float: right;
display: inline;
margin-bottom: 50px;
}
nav {
clear: both;
}

那应该为你解决

不要忘记从div#loginsectionaswell 中删除 clear 否则它将忽略img#logo左侧的浮动

于 2013-04-21T12:38:19.270 回答