css - Html file works locally on IE, but not on server. Works fine for Opera, Chrome, Safari and Firefox -
basically, title states, file works locally, not when uploaded server.
here's live working version: jsfiddle
code extracted http://www.onextrapixel.com/2013/07/31/creating-content-tabs-with-pure-css/
*the divs displaying right below parent tab. that's ok, striped down code post question.
this in 1 file, there's no reference external files, path problems should ruled out.
thanks.
google chrome
ie local
ie when uploaded webserver
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>pure css tabs fade animation demo 1</title> <style type="text/css"> body, html { height: 100%; margin: 0; -webkit-font-smoothing: antialiased; font-weight: 100; background: #aadfeb; text-align: center; font-family: helvetica; } .tabs input[type=radio] { position: absolute; top: -9999px; left: -9999px; } .tabs { width: 650px; float: none; list-style: none; position: relative; padding: 0; margin: 75px auto; } .tabs li{ float: left; } .tabs label { display: block; padding: 10px 20px; border-radius: 2px 2px 0 0; color: #08c; font-size: 24px; font-weight: normal; font-family: 'roboto', helveti; background: rgba(255,255,255,0.2); cursor: pointer; position: relative; top: 3px; -webkit-transition: 0.2s ease-in-out; -moz-transition: 0.2s ease-in-out; -o-transition: 0.2s ease-in-out; transition: 0.2s ease-in-out; } .tabs label:hover { background: rgba(255,255,255,0.5); top: 0; } [id^=tab]:checked + label { background: #ececec; border-bottom: 3px orange solid; color: black; top: 0; } [id^=tab]:checked ~ [id^=tab-content] { display: block; } .tab-content{ z-index: 2; display: none; text-align: left; width: 100%; font-size: 20px; line-height: 140%; padding-top: 10px; margin-top:10px; background: #ffffff; padding: 15px; color: black; position: absolute; box-sizing: border-box; -webkit-animation-duration: 0.5s; -o-animation-duration: 0.5s; -moz-animation-duration: 0.5s; animation-duration: 0.5s; } </style> </head> <body> <div class="container"> <div class="main"> <ul class="tabs"> <li> <input type="radio" checked name="tabs" id="tab1"> <label for="tab1">test 1</label> <div id="tab-content1" class="tab-content animated fadein"> "lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." </div> </li> <li> <input type="radio" name="tabs" id="tab2"> <label for="tab2">test 2</label> <div id="tab-content2" class="tab-content animated fadein"> "sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? </div> </li> <li> <input type="radio" name="tabs" id="tab3"> <label for="tab3">test 3</label> <div id="tab-content3" class="tab-content animated fadein"> "but must explain how mistaken idea of denouncing pleasure , praising pain born , give complete account of system, , expound actual teachings of great explorer of truth, master-builder of human happiness. no 1 rejects, dislikes, or avoids pleasure itself, because pleasure, because not know how pursue pleasure rationally encounter consequences extremely painful. nor again there loves or pursues or desires obtain pain of itself, because pain, because circumstances occur in toil , pain can procure him great pleasure. take trivial example, of ever undertakes laborious physical exercise, except obtain advantage it? has right find fault man chooses enjoy pleasure has no annoying consequences, or 1 avoids pain produces no resultant pleasure?" </div> </li> </ul> </div> </div> </body>
i can not reproduce problem ie9 (on win7). both versions (local , on linux-webspace) fine in ie9. show "broken" result third screenshot when switch ie ie-compatibilty-mode or ie8-mode or ie7-mode.
since can ie allows different settings internet, intranet , trusted sites, think should have @ these settings in ie , reset them default settings.
Comments
Post a Comment