Jump to content

problem with (probably)float code


dhuan

Recommended Posts

this is the website: http://portalbr.l4rge.com/

 

open it in both FIREFOX and INTERNET EXPLORER.

you'll see that the avatar on the box is correctly shown on IE but when you see it throught FIREFOX the avatar just cuts

 

 

this is the image code:

<img src="img.jpg" align=left border=1>

 

 

this is the css code used in the box:

width: 476px;
height: 24px;
background-color: #7E7956;
padding-top: 6px;
padding-left: 8px;
border-style: outset;
border-width: 1px;

Link to comment
https://forums.phpfreaks.com/topic/147375-problem-with-probablyfloat-code/
Share on other sites

Probably because the image is floated left. Containers are not meant to wrap floated children and IE's behaviour is not in line with the specification. You can have the container completely wrap the image by floating it left too, or adding overflow:hidden, or by using some version of the "clearfix" (google: clearfix position is everything).

Probably because the image is floated left. Containers are not meant to wrap floated children and IE's behaviour is not in line with the specification. You can have the container completely wrap the image by floating it left too, or adding overflow:hidden, or by using some version of the "clearfix" (google: clearfix position is everything).

 

Yeah, 'overflow:hidden' did get the job done.

Thanks.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.