开发者

CSS position:fixed and IE7

开发者 https://www.devze.com 2023-02-10 19:12 出处:网络
I have a few div boxes that are using position:fixed and I use a margin-top and margin-left in order to put them where I want them to be.

I have a few div boxes that are using position:fixed and I use a margin-top and margin-left in order to put them where I want them to be.

Everything works very well with FF/Chrome, but IE7 seems to fail at displaying these boxes at all.

I've googled it and I understand that only IE7 bet2+ knows how to display position:fixed items properly.

I'm looking for a solution that will allow these boxes to be displayed correctly on all IE7 browsers. Can anyone assist?

CODE: (The two divs in question are the ones with 开发者_JAVA百科the inline styling)

<div id="rn_PageContent" class="rn_Home">
    <rn:widget path="search/ProductCategoryList" data_type="categories" label_title="#rn:msg:FEATURED_SUPPORT_CATEGORIES_LBL#"/>
    <div style="float:right;width:310px;background-color:#000;border-style:solid;border-width:1px;border-color:#999999;padding:5px;position:fixed;">
        <h2 style="border-bottom:1px solid #BBBBBB;margin-bottom:10px;padding-bottom:2px;">Most popular questions</h2>
        <rn:widget path="reports/Multiline2home" report_id="#rn:php:$report_id#" per_page="5" />
        <rn:widget path="reports/Paginator" report_id="#rn:php:$report_id#"/>
    </div>
    <div style="float:right;width:310px;background-color:#000;border-color:#666;border-style:solid;border-width:1px;padding:5px;margin-top:10px;position:fixed;">

        <rn:widget path="standard/knowledgebase/PreviousAnswers2" number="3" />
    </div>  
</div>

Thanks,


position: fixed elements are positioned with the properties left and top (or right and bottom) not with margin.

0

精彩评论

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

关注公众号