开发者

How come when floating a div inside a fieldset to the left, it actually floats right?

开发者 https://www.devze.com 2023-02-17 14:55 出处:网络
here is the html:开发者_运维技巧 <fieldset> <div> </div> </fieldset> here is the css:

here is the html:开发者_运维技巧

<fieldset>
   <div>
   </div>
</fieldset>

here is the css:

fieldset
{
  float:  left;
  width:  200px;
}
   fieldset > div
   {
      float:  left;
      width:  100px;
   }

and for some reason the div appears to be floating right, why is that?


It actually works fine with me. It floats to the left, instead to the right.
Here's something that I tried,
Index.html

<html>
<head>
<title></title>
<LINK REL=StyleSheet HREF="index1.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<fieldset>
<div> </div>
</fieldset>
</body>
</html>  

and index1.css

fieldset
{
  float:  left;
  width:  200px;
}
fieldset > div
{
     float:  left;
     width:  100px;
  } 

and the fieldset is on the left.

Have a look here : Floating div to left inside the fieldset

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号