CSS - 2 Identical Css Code Only 1 Works In Ie9
I can't figure out for a life of me why is out of two identical code only one of them plays nice with IE9.
I'm a noob in coding CSS/HTML so any help/explanation would be greatly appreciated. Here is the two code as follows: Working in IE9: .boxed { border: 1px solid; border-bottom-color:#a5a5a5; border-right-color:#e1e1e1; border-top-color:#e1e1e1; border-left-color:#e1e1e1; background-color: #F2F2F2; padding: 15px 15px 15px 15px; margin: 10px 10px 10px 10px; -moz-border-radius: 9px; -webkit-border-radius: 9px; -khtml-border-radius: 9px; border-radius: 9px; -moz-box-shadow: 0px 8px 6px #000; -webkit-box-shadow: 0px 8px 6px -6px #000; box-shadow: 0px 8px 6px -6px #000; } Not working in IE9: .text-box{ border: 1px solid #ebebeb; background-color: #f5f5f5; /* filter:alpha(opacity=90); */ -moz-border-radius: 9px; -webkit-border-radius: 9px; -khtml-border-radius: 9px; border-radius: 9px; -moz-box-shadow: 0px 8px 6px -6px #000; -webkit-box-shadow: 0px 8px 6px -6px #000; box-shadow: 0px 8px 6px -6px #000; font-size: 12px; padding: 19px 9px 19px 12px; margin: 10px 10px 10px 10px; } Similar TutorialsThis is based directly off of Eric Mayer's pure css popups. I know he states in his img tutorial "...considering that even if we used the display: none/display: block trick in the SPAN-popup demo, Explorer has trouble.", but the fact I have it working flawlessly for the first piece of code gives me hope. Of note -- for better or worse, I intentionally put IE6 in quirks mode with <?xml version="1.0"?> right before my doctype. I know it's not the best idea in the world, but it means my code works completely as intended for IE5/5.5/6, and all other browsers I've been able to test (firefix/opera -- windows). Code: HTML: <li><a href="#">F. A. Q.<span>We understand there's going to be some questions -- check here and you might find some answers or how-to's.</span></a></li> <li><a href="#">Help Desk<span>Couldn't find an answer to your question? Find a non-serious glitch or bug? Feel free to head to our support desk and create a ticket. We'll be in touch with you promptly about your question or concern.</span></a></li> <!-- Repeat, roughly 10 links, some of which are in submenus - all work as expected --> Code: CSS: #mainMenu li a span { display: none; } #mainMenu li a:hover span { display: block; position: absolute; top: 152px; right: 32%; } /* For posting I removed the formatting tags like border, padding etc */ That works as expected. Upon rolling over the link, the span is displayed, positioned absolutely elsewhere on the page. On rollout, it hides again. However, when I cut and paste that CSS and change only the anchor i'm referencing: Code: HTML: <td> <a href="#" class="date"> 08/06/06<span>August 6th, 2006 -- 8:09am</span> </a> </td> <!-- I have roughly 20 cells identical to that, but with different dates. Yes, there's good reason for using tables :p --> Code: CSS: a.date span { display: none; } a.date:hover span { display: block; position: absolute; top: 0px; left: 0px; } a.date:hover { color: red; } /* Again, I removed formatting */ It works as expected in everything except IE. I thought this is because IE doesn't like the fact i'm adding a class to the anchor... a.date:hover span ... but even when I remove the .date a:hover works and a:hover span doesn't. What's going on? Thanks in advance, Brett Ok, I have basic CSS knowledge but need some help. Here's what I'd like to do: I take trips and post pictures on my site. I use lighthouse to display the images, so each image has a separate filename and caption, and each group of images has a separate group name. Under "Ski Trip", for instance, I'll have Img 1, "Skiing"; Img 2, "More skiing"; etc. It's relatively tedious to create page after page that uses the same format. I use CSS for style, the menu, and Lighthouse, but is there way that I could create a new page entitled "New ski trip.html" and in that file just have a list of the image filenames, captions, etc., that end up all using the same html format to display the images? I don't think I'm being terribly clear (sorry) ... big kudos to anyone who can help. well i sort of know why, because they render things differently but i have looked in my code and cant figure out why it will be different for ff click here I have pulled my last hair so I come to you with a red face. these tags are in the head section Code: h3 {color: blue} pink {color: blue} In the body I have Code: <h3> what color is it? </h3><BR> <pink> it should be blue </pink> both lines print in blue on FF. IE6 shows h3 in blue but pink is plain, black text. Please embarass me with a simple answer. Thanks in advance, stujo NEWB here. Working on a project that has a custom ul w/ background images and sub menus the css currently in place works for all browsers except IE when using the IE developer tool, I can see all the applied styles for the items. For some reason IE is just randomly throwing in a padding-top from somewhere that's screwing up the alignment. There is NO source css file referenced or noted as to where it's coming from. As soon as it's removed, it display properly. I have explicitly set the style in the UL and the li to have the correct padding, but IE just seems to ignore them and throws in a padding of it's own. ANY IDEAS here? Anyone? Beuller? I've seen this type of nav bar on different websites and have tried to figure out how it's used, but I don't know what I'm looking for. An example is on the Twidroyd site (you can google it--as a new user I can't post links) The nav bar image is three bars stacked one on top of the other, where there are bars for inactive, active, and hover. I can't figure out how this works. Not necessarily asking for a detailed explanation, just what the technique is called so I can research it myself. Any help appreciated! Here's the css code. Code: .toolbar a:hover, .toolbar a:focus, .toolbar a:active { background-color:#F5F9FA; } .toolbar { border:0; padding:0; margin:auto; border-collapse:collapse; } .toolbar a { display:block; text-align:center; vertical-align:middle; white-space:nowrap; } .toolbar a:hover, .toolbar a:focus, .toolbar a:active { text-decoration:none; } It works fine when you hover over a link, it lights up the back of the td which is what I want. However I would like the whole td to act as a link. So wherever you move the mouse over the td it lights up and would link to the page, instead of just over the text. Any suggestions? Hi I have a website which works fine in Firefox, but has problems in Internet Explorer. can someone please have a look and see what is wrong? the positioning of the Div boxes go wrong in IE, and also it seems like the site is scretched vertically. many thanks Hi, I have apage where the div only works on the bottom on the page. I am trying to place it also in the center to divide content. Here is the CSS code: Code: .doubleLine{ clear:both; position:relative; float:left; width:1172px; height:6px; background-image: url(images/common/double_line.gif); background-repeat: no-repeat; margin-left:37px; margin-right:0px; margin-top:6px; margin-bottom:6px; padding:6px 0px 6px 0px; } can anyone tell me why this div with an image won't appear between content? I havetried everything I could think of. thanks Hi, I'm trying to create a transparent background for the main text part of a site. I have the following code in the .css file: Code: .dataContainer { background-image:url('/images/transluscentbg.png'); *background: none: filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/transluscentbg.png',sizingMethod='scale'); padding:10px; } and call it he Code: <html><head> <link rel="stylesheet" type="text/css" href="styles/kr.css" /> <meta name="description" content=""> <meta name="keywords" content=""> <script src="rollover.js" type="text/javascript"></script> </head> <body id={$styleName|lower}> <!-- BEGIN OUTER WRAP --> <div id="bodywrap"> <div id="logoSpace"> </div> <!-- BEGIN MAIN CONTAINER --> <div id="content"> <div id="contentBorders"> <div id="mainContent" class="clearfix map{$mapNum}"> <div id="navBar"> <div id="innerContent" class="clearfix"> {include file="nav.tpl"} <div class="goContent"> <div class="dataContainer"> lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum </div> </body></html> This works fine in Firefox, but .dataContainer has no transparent background in IE. HOWEVER! It does work in both IE and Firefox if, instead of using <div> tags, I put the content in a table (<table><tr><td class="dataContainer">). Anyone have any idea why this might be happening and how i might be able to get the <div> to work? Fixed. Using Axure to create working prototypes for use in usability testing. The code created by Axure works well in IE7 but the function does not work in IE6...which I think, most of my usability testers will be using. What this code is trying to do is, click on a link in one box which automatically copies and pastes the code to destination box. The idea is to let the user copy and paste content from a previous message. Has anyone ever come across this issue? I'm sure it how IE handles .css but was hoping there may be a fix. Code: <DIV id=u23_rtf><span style=" font-family:'Arial'; color:#000000; font-size:15px;"><b>Message:</b></span></DIV></DIV> <SELECT id=u24 style="position:absolute; left:290px; top:558px; width:180px; height:22px; ; background-color:#FFFFFF; text-align: left ; font-family:'Arial'; font-size: 13px; color:#000000; font-style:normal; font-weight:normal; text-decoration:none" > <OPTION selected value="English">English</OPTION> <OPTION value="Spanish">Spanish</OPTION> </SELECT> <DIV id=u25 style="position:absolute; left:505px; top:623px; width:230px; height:18px; ; ; text-align: left ; font-family:Arial; text-align:left; word-wrap:break-word;" > <DIV id=u25_rtf><span style=" font-family:'Arial'; color:#000000; font-size:15px;"><b>Copy Previous Message</b></span></DIV></DIV> <SELECT id=u26 size=2 style="position:absolute; left:505px; top:646px; width:230px; height:120px; ; background-color:#FFFFFF; text-align: left ; font-family:'Arial'; font-size: 13px; color:#000000; font-style:normal; font-weight:normal; text-decoration:none" > <OPTION value="Contribute more to your / English">Contribute more to your / English</OPTION> <OPTION value="Happy Holidays / English">Happy Holidays / English</OPTION> <OPTION value="Hola / Spanish">Hola / Spanish</OPTION> <OPTION value="Time to consolidate / English">Time to consolidate / English</OPTION> </SELECT> hi The following CSS code works in Firefox, but not IE. The site has a fixed top bar using CSS which works perfectly in firefox, but stuffs up in IE. Does anyone know what I need to change it to to fix the problem? Code: html, body { margin: 0; padding: 0; height:100%; max-height:100%; font-size: 90%; font-family: verdana, sans-serif, arial, helvetica; background-image: url('images/gradient.jpg'); background-repeat: repeat-x; background-color:#fff; } #header { position: fixed; top: 0px; left: 0px; width: 100%; height: 100px; z-index: 1; height: 50px; margin-bottom: 2em; background-image: url('images/gradient2.jpg'); background-repeat: repeat-x; } #topmenu { position: absolute; left: 250px; top: 30px; width:560px; } #stats { position: absolute; right: 15px; top: 5px; text-align: center; } #gutter { float: left; width: 3%; height: 1px; } #col { float: left; width: 70%; margin-bottom: 1em; padding-right: 3%; margin-top: 5.5em; } #rescol { float: left; width: 94%; margin-bottom: 1em; padding-right: 3%; margin-top: 5.5em; } #rescol a { text-decoration:none; } #rescol td { text-align: center; } #col1 { float: left; width: 45%; margin-bottom: 1em; border-right: 1px solid #ccc; padding-right: 3%; margin-top: 5.5em; } #col2 { float: left; width: 15%; margin-left: 3%; margin-bottom: 1em; padding-right: 3%; margin-top: 5.5em; } #col3 { position: absolute; right: 30px; margin-left: 3%; margin-bottom: 1em; margin-top: 5.5em; } #footer { clear: both; height: 50px; padding: .5em; font-size: 11px; } #footer ul { border-top: 1px solid #ccc; margin: 0; padding: 1em 0 0 0; list-style: none; } #footer li a, #footer li span { display: block; float: left; padding: 5px 1em; border-right: 1px solid #ccc; } #footer li span.copyright { border-right: none; } a:hover { color: #003; } h1 { margin: 0; padding: .5em; } h2 { margin: 0; } hr.c { border: none 0; border-top: 1px solid #ccc; width: 100%; margin-bottom: 10px; text-align: center; height: 1px; } <!--[if IE 6]> body { overflow: hidden; } div.content { height: 100%; overflow: auto; } <![endif]--> I got my css menu to work in Firefox and have it to show the way I want it to, but now in IE it just shows up as a list of course, the experienced people will no that by looking at the code which I hope you can help me out by fixing it, so here it is dont laugh. Code: ul#menu{ margin:0; padding:0; list-style-type:none; width:790px; display:block; height:40px; text-transform:uppercase; font-size:13px; background:transparent url("images/black.jpg") repeat-x top left; font-family:Helvetica,Arial,Verdana,sans-serif; } ul#menu li{ display:block; float:left; margin:0; pading:0; border-right:1px solid #ffffff; } ul#menu li a{ display:block; float:left; color:#ffffff; text-decoration:none; padding:12px 20px 0 20px; height:28px; } ul#menu li a:hover{ background:transparent url("images/blue.jpg") repeat-x top left; } Thank You I am new to style sheets, and I have been trying to get an entry level position with a web developer here close to me. They sent me a PSD and told me to layout using nothing but CSS and no tables. So I did so... and it looks fantastic in Firefox, but not at all good in IE. The only real problem is with the positioning.. the content color and size and everything seems to be fine.... all the positioning is done in the code on the website, where you can view source... I pasted the CSS code below, but doubtful it will help much. Can anyone offer me some help? The site is he http://www.eomnis.com/test the style sheet is here http://www.eomnis.com/test/css.css and i pasted the style sheet code below. Thanks for any help everyone. Aaron <style type="text/css"> body { background-image: url('images/main_background.jpg'); background-color:#000000; background-repeat: no-repeat; margin: 0px; } .top_text { font-size: 14px; font-family:Verdana, Arial, Helvetica, sans-serif; color:#FFFF00; font-weight:400; } .bold_grey{ font-size:11px; font-family:Verdana, Arial, Helvetica, sans-serif; color:#EEEEEE; font-weight:300; letter-spacing:inherit; } .small_text{ font-size:9px; font-family:Verdana, Arial, Helvetica, sans-serif; color:#EEEEEE; font-weight:300; letter-spacing:inherit; } form { font-family:Verdana, Arial, Helvetica, sans-serif; color:#FFFFFF; font-size:10px; font-weight:300; } .select { font-size:9px; height:15px; } .input { font-size:9px; height:16px; width:160px; } .zip { width: 94px; height:16px; font-size:9px; } .Footer_links{ color:#CCCCCC; font-size:14px; font-weight:300; text-decoration:none; } </style> Hi all, I got my css layout to work in Opera, which is already an achievement for a newbie like me. But I'm facing some problems with FF and IE. First: in both the header image is gone Second: in IE the menu images are shown too wide resulting in a messed up menu Third: IE for some reason widens up the sidebar and content so the sidebar is shown below and also the footer is misplaced. I'm still trying to debug it myself but I don't seem to be able to solve them. my blog Any help or ideas are appreciated. Kind regards, Jef I am trying to make a menu on my website and it works well on internet explorer 7. I went onto firefox to check it and it is not working so great. The link is:-alrwritingservices.co.uk. The css:- Code: .solidblockmenu{ margin: 0; padding: 0; float: left; font: bold 13px Arial; width: 100%; border: 1px solid #625e00; border-width: 1px 0; background: black url(backygnav.gif) center center repeat-x; list-style } .solidblockmenu li{ display: inline; } .solidblockmenu li a{ float: left; color: #FFFFFF; font-weight: bold; padding: 9px 11px; text-decoration: none; border-right: 1px solid white; } .solidblockmenu li a:visited{ color: white; } .solidblockmenu li a:hover, .solidblockmenu li .current{ color: white; background: transparent url(backgnavhover.gif) center center repeat-x; text-decoration: none; font-weight: bold; float: left; } The html:- Code: <ul class="solidblockmenu"> <li><a href="index.php" class="current">Home</a></li> <li><a href="about.php">About Me</a></li> <li><a href="samples.php">Samples</a></li> <li><a href="manual.php">Manual</a></li> <li><a href="testimonials.php">Testimonials</a></li> <li><a href="quote.php">Get A Quote</a></li> <li><a href="faq.php">FAQ Section</a></li> </ul> <br style="clear: left" /> How would i make it look better in firefox and would would be the hack for internet explorer. Is theer any help available on the internet about this? Many thanks in advance, Stevo I have the following CSS that I believe is valid, but it only works in IE. In fact in IE it works perfect, but in FireFox it does not display anything at all. Code: <div style="font-size:8px; text-align:left; background-color:red; width:100px;"><div style="font-size:8px; background-color:green; width:75px;"></div></div> What I am trying to do is display a rating. In the above example, the rating is 75/100, so a green bar 75px long over a red bar 100px long. is there anything special i need to do to get CSS to work with IE? Here is what i have above the </head> tag Code: <link rel="stylesheet" type="text/css" href="layout.css"> the layout.css has: Code: catheader { color:#ffffff; font-size: 14px; font-weight: bold; font-family: verdana; } then in the <body> i have Code: <catheader>My New Category</catheader> In netscape it shows correctly, in IE it doesnt read it at all. any ideas? www.strutmag.com/newstrut/ I'm working on a site that is using CSS layout. I use a Mac at work and the site looks great on it. I've checked it on the Mac on Safari, IE, and Firefox. When I went home the other day, and I checked the site on my PC (on IE and Firefox), the site did not layout correctly. I think the main issue is the relationship between the left section (where the large image is) and the floated right content box. I was really surprised to see it not working on my PC, so now I'm at a loss. I'm wondering if anyone has any suggestions about about the cross-platform, cross-browser differences I need to account for. Please help! Thanks! CSS |