开发者

Textbox inside div goes down in IE

开发者 https://www.devze.com 2023-01-03 21:37 出处:网络
my problem is that the gray textbox goes down when im on Internet Explorer 8, i tried with {top: 0px} and other things but I can\'t get it right...

my problem is that the gray textbox goes down when im on Internet Explorer 8, i tried with {top: 0px} and other things but I can't get it right...

Preview

http://i265.photobucket.com/albums/ii213/omegakenshin/other/rEdHellCorner.jpg

And here is my code...

<div class="textboxS">

<img src="images/textbox_corner.png" alt="redCorner" name="redCorner" width="73" height="77" class="redCorner" />

    <table width="100%" border="0" cellpadding="0" cellspacing="0" 开发者_StackOverflow社区class="tbSMain">
    </table>
  </div>

and my CSS...

.textboxS {
    width: 550px;
    margin: 30px 0px 0px 220px;
    position: relative;
}

.tbSMain {
    position: relative;
    top: 0px;
    margin: 0;
    padding: 0;
}

.redCorner {
    float: right;
    margin: -33px -30px 0px 0px;
}


To use

top: 0px;

you need to put the position as absolute:

.tbSMain {
    position: absolute;
    top: 0px;
    margin: 0;
    padding: 0;
}

I would also suggest to change the .redCorner to float: left; and adjust the margins accordingly. Negative margins can break things.

0

精彩评论

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