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
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).

Link to comment
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).

 

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

Thanks.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.