Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Condtional block of html for IE6
 
bennimartin
Jr. Member
 
Total Posts:  8
Joined:  2010-12-23
 

Hey all,

I have posted this elsewhere but couldnt get a response so i thought id ask my fellow aussies…

Basically what i want to do is to encourage people who use IE6 to upgrade their browsers! My site doesn’t work that great in IE6 and so rather than spend ages developing new css and js for it i want to create a warning box that pops up.

The html is listed below. Im just not sure how to call it up in page.xml

In html it would look like this.

<!--[if lt IE 7]>
<
div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 120px; position: absolute; top:50px; z-index:100; left:0;'>
    <
div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='[removed]this.parentNode.parentNode.style.display="none"; return false;'><img src='/static/img/ie6/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div>
    <
div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
        <
div style='width: 75px; float: left;'><img src='/static/img/ie6/ie6nomore-warning.jpg' alt='Warning!'/></div>
        <
div style='width: 275px; float: left; font-family: Arial, sans-serif;'>
            <
div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>You are using an outdated browser</div>
            <
div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>For a better experience using this siteplease upgrade to a modern web browser.</div>
            <
div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>If you decide to continue and have difficulty placing your order please contact Customer Service on 123456778.</div>
        </
div>
        <
div style='width: 75px; float: left;'><a href='http://www.firefox.com' target='_blank'><img src='/static/img/ie6/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div>
        <
div style='width: 75px; float: left;'><a href='http://www.browserforthebetter.com/download.html' target='_blank'><img src='/static/img/ie6/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 7'/></a></div>
        <
div style='width: 73px; float: left;'><a href='http://www.apple.com/safari/download/' target='_blank'><img src='/static/img/ie6/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>
        <
div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'><img src='/static/img/ie6/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div>
    </
div>
</
div>
<!
[endif]-->

I know it has to be put in the format below:

<action method=\"addItem\"><type>skin_css</type><name>css/styles-ie8.css</name><params/><if>IE 8</if></action>

But im not sure of the type or the action method..

Can anybody point me in the right direction..?

Would really be appreciated.

Kind Regards,
Ben

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top