CSS - Hack For Italics & Ie
I've encountered the italics problem with IE and am trying to work around it. I followed the hack from the http://www.positioniseverything.net...alicbug-ie.html page but it really screws things up. My page is cut, more or less, into 3 sections: header, main, footer. Since I don't use any italics in either the header or footer, the rule needs only to apply to main. It CAN apply to the others, but it doesn't need to. Now, when I apply the hack, instead of my page lining up with the 'header' on the left hand side and the main on the right hand side, it completely pushes my 'main' area down so that it doesn't start until after the header and I have no idea why? I noticed that if I put the hack in each particular page (rather than in the external file sheet) then it works, but why?
Similar Tutorialswhen reading an identifier in CSS IE will treat two dots in a class decleration as one: accepted rules (strict mode): Code: win ie 5.01: p..class, p./**/.class win ie 5.5 : p..class win ie 6 : p..class, p./**/.class, p./**/class, p/**/.class win ff 1.5 : p./**/class, p/**/.class (comments ignored) win opera : (as firefox) win ns 7.0 : none! I used this tutorial to create my rounded corner boxes. Now if I change the font in the content of the box to italics, IE goes bananas. I read about the "Holly Hack" by setting the height to 1%. I can't seem to get it work with these rounded corner boxes. I'm not sure what div to apply it to. Here is the relevant html for the boxes: Code: <div class="bluebox"> <div class="hd"><div class="c"></div></div> <div class="bd"> <div class="c"> <h4>Something</h4> <p>Content Goes Here</p> </div> </div> <div class="ft"><div class="c"></div></div> </div> And the css is this: Code: .bluebox { margin:0 auto 8px auto; color:#fff; } .bluebox .hd .c{ font-size:1px; height:16px; } .bluebox .ft .c{ font-size:1px; /* ensure minimum height */ height:18px; } .bluebox .hd { background:transparent url(images/tlb.gif) no-repeat 0px 0px; } .bluebox .hd .c { background:transparent url(images/trb.gif) no-repeat right 0px; } .bluebox .bd { background:transparent url(images/mlb.gif) repeat-y 0px 0px; } .bluebox .bd .c { background:transparent url(images/mrb.gif) repeat-y right 0px; } .bluebox .bd .c .s { background:#1caaec url(images/msb.jpg) repeat-x 0px 0px; } .bluebox .ft { background:transparent url(images/blb.gif) no-repeat 0px 0px; } .bluebox .ft .c { background:transparent url(images/brb.gif) no-repeat right 0px; } .bluebox h4 { font:0.9em Verdana, sans-serif; font-weight:bold; padding-left:5px; } .bluebox p { font:0.8em Verdana, arial, sans-serif; font-style:italic; padding:2px 10px 8px 5px; text-align:justify; color:#000000; } Any ideas where to stick the Holly Hack? Hi, I've done the usual amount of searching and can't find anything on this anywhere. That probably means its not possible but i'll ask anyway. Can you change the angle the text is at when italics are used? I would like it to be somewhere in between normal and italics. Thanks for any help I decided to check how my site looks in Opera, so I installed the latest Mac version and found that none of the italics showed up where I was using sans-serif fonts. For example, the code below works as I expect it to in other browsers, but in Opera each line appears as normal (not italicized) text: <body style="font-family:sans-serif;"> <p>Normal Text.</p> <p><i>Italicized text.</i></p> <p><em>Emphasized text.</em></p> <p style="font-style: oblique;">Oblique text.</p> <p style="font-style: italic;">Italic text.</p> Everything works fine if font-family is serif. Has anybody seen this problem or know how to get sans-serif fonts italicized in Opera? Seems like someone else must have noticed this, but I couldn't find an explanation anywhere. Thanks! Hello CSS gurus, When I add an italic font style to my web page, it causes a vertical shift in IE6. Everything is fine in Firefox. Can anyone tell me what is happening with this? Vertical Shifted with Italics: http://www.innovations-online.com/t...ch_news_it.html No Italics is Fine: http://www.innovations-online.com/t.../tech_news.html The same problem occurs with oblique. Thanks in advance! Darin nevermind got it sorted out Quote: hi, i just made a footer the other day and had to realize (at work today) that it is not quite there in IE where it is in FF. it seems to have to do with another element on the page (the navigation) - you will see what i mean by viewing the following page in IE: http://www.chocolateriewanders.com could you just tell me which one of the endless hacks for IE i need to apply - or how you call this alignment problem (then i can look it up in google myself ... i just need to know how you call this) thanks Hi all, I need some help. I know I need an IE hack to make my drop down menu on the header of this page work correctly (hover over 'pictures', 'rides', or 'maps') but for the life of me I can't seem to find what that workaround (hack) is. Please help! Oh yeah, of course, it work perfectly fine in Firefox. Here's a copy of the 2 CSS files I am using for this page... main2.css header.css And yeah, I am still working on the header, that's why it looks kinda empty right now. =) Manny Hello all, I'm really interested in hearing the opinions of those more seasoned in web development. I have been working hard at learning CSS and believe I have really improved my web design skills because of it. I love working with CSS and have completely freed myself from tables. But... I am so tired of playing for hours with the coding just so my page looks okay in both IE and FF. I'd much rather my page look great in FF (my prefered browser) and to heck with IE. I have made my stand and will no longer design my personal pages for IE. I have a clear message on one of them telling my visitors to wise up and download FF. Of course my audience allows me to get away with this. I realise that if your visitors are average surfers who barely know how to do a search on google, they aren't about to deviate from IE. But for those audiences who have a little more internet experience, do you think it's cool to try and push them into using FF? In terms of usage it's clearly on the rise, IE has been steadily declining. I'd really like to see IE hit bottom. The way I see it, as long us the development community continues to jump through hoops so people can keep using IE or other inferior browsers, there will be little motivation to develop some solid web browser standards. Any thoughts? Yeah, we all know IE sucks because we have to do all types of extra css to make it work. I just did a design update on my site. I did my usual, worked the design with Chrome and Firefox. I got it all working with those browsers, and them I just opened IE 7 so see how much more work I need to do for IE. Well to my surprise, everything was correct. I checked IE 8. Same thing. It all looked correct. Now, I may have had a stroke and didn't know. So I'm asking if someone can look at my site with there IE 7 or 8 and confirm that looks alright. www. netgamegurus .com I just don't believe that I could have coded it that perfect. From my experience it just not possible. Sorry about the URL hack, but I came to this forum for css support and it's kinda hard to get css suport if we can't post URL's to show our css at work. Hey guys nice forums.....am a css noobie i wanna know one thing how do i make a div stretch horizontally 100% , basically i want my website to be divided into 2 colors black and white the lower part would be black and the upper part would be white , now am not using a div container as i read through previous topics before so am using 2 divs as follows <div id="White">White area</div> <div id="Black">Black area</div> when i preview in IE i see the colors as i want but the divs do not stretch 100% as i said in the css. how do i do it ? hope i made myself clear on this I'm trying to apply the min-height hack for IE shown here http://www.greywyvern.com/code/min-height-hack.html It entails floating a 1 pixel wide box, then put your content below, then clear the float. It seems to work fine, but something in my layout is screwing this up royally on IE. Can someone take a look at this on IE and compare it to firefox. What in the world is IE doing here? http://section31.us/temp/rateyourmo...min-height.html That layout is just part of a larger website that i'm working on for fun. http://section31.us/temp/rateyourmovie.com/index1.php Here's how it works: first you make CSS rules like these, for example:
css Code: Original - css Code body { font-size: small; } body.0 { font-size: x-small; } #content { width: auto; } .0 #content { width: 100%; } body { and then you specify the class and id attributes: html4strict Code: Original - html4strict Code <body class="0"> <div id="content"> <body class="0"> The first of each rule targets strict standards mode, while the second of each rule targets quirks mode, including accidentental quirks mode due to a failure to read and parse the DTD. Why does it work? Because in standards mode, numeric classes (0, 1, 2, 23, 586, etc.) are correctly not applied to the rendered document, whereas with Quirks Mode in IE and Opera, these styles are parsed and applied. Technically the dot-zero rules will not validate, but the HTML will. So don't freak out if your CSS is flagged as invalid; this hack wasn't intended for standards mode anyway. Note: This hack will not work on Firefox, but since its default mode is not quirky, it doesn't matter. As I understand it, IE supports "hover" only when applied to a link, where with Firefox and Safari you can apply hover to any element. I am wondering if any of you know of a hack for IE to make hover applicable to any element. Below is my CSS. Code: .amy-navigation { padding: 30px 15px 0px 15px; height: 22px; float: right; } div.amy-navigation:hover { background-color: white; text-decoration: none; border-bottom: solid 1px #b1cc8d; } div.amy-navigation:hover > a { color: #acadac; text-decoration: none; } Using Firefox or Safari you can see what I'm trying to do in my header at www.amydelez.com If you are having problems with Son of Suckerfish and IE7, where the drop down menu will not disappear like it should. Take out the javascript because you do not need it with IE7, but if you still want IE6 to work then put it in. For IE7, you need to add Code: *:first-child+html #nav { height: 1%; } *:first-child+html #nav li { height: 1%; } to your css and you will be fine. Don't ask me why, Don't ask how, i just chalk it up to just IE When the :not pseudoclass is used with an element selector in Firefox, it works as expected, excluding the selector inside the parentheses. But used by itself or attached to the * selector, it applies the rule to ALL elements. This unexpected behavior can be exploited to write Mozilla-specific patches to your CSS code. example:
html4strict Code: Original - html4strict Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Testing :not Hack</title> <style type="text/css"> :not([id]) p { font-weight: bold; } </style> </head> <body id="thisthing"> <p>This is a test.</p> <p id="test">This is a test.</p> <div>This is a test.</div> </body> </html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> The idea is to set the ID of the parent and browsers which correctly interpret this selector will not apply the rule to anything; also those browsers which don't already support it will simply ignore it. The :not selector is part of the new CSS3 recommendation. Here's just the css code for the hack: css Code: Original - css Code :not([id]) example { /* Moz/FF/Netscape code here */ } :not([id]) example { Hello, Is there a hack for Safari 3. I found this hack : @media screen and (-webkit-min-device-pixel-ratio:0) { #safari { display: block; } } The problem with this hack is that he is valid for all verison of Safari. My need is a hack only for Safari 3. Thank you in advance for your help. I read about a cross browser min-width hack he http://www.hackszine.com/blog/archi..._css_minhe.html Which seemed simple enough, but when I try it doen't seem to work. Here's my code Code: <a href="#" class="nav"><img src="/images/left.gif" alt="" />Next<img src="right.gif" alt="" /></a> Code: .nav { display:block; min-width:100px; width: auto !important; width: 100px; background-image: url(/images/btn_section_nav_bg.gif); } My end goal is to have a button that can expand to whatever width the text is inside it. Anyway TIA I have been having my share of problems with CSS lately for this one site I'm working on (this is my 3rd thread here about it) and now after researching I believe this one is from what I think is called a box model bug. The problem is this: The border heights for my <div>'s are perfect in FF but when I test in IE the are too long! below is my code and a url to the project. Code: * { margin: 0; padding: 0; } body { background-color:#FFFFFF; text-align:center; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#000000; } #site { width:775px; height:500px; margin:25px auto 0 auto; border:none; } #container { width:775px; height:500px; margin:0 auto 0 auto; border:1px solid #99CCCC; } #header, img { margin-top:10px; border:none; cursor: default; } #left { width:210px; height:201px; margin-top:80px; margin-left:20px; border-top:1px solid #99CCCC; border-right:1px solid #99CCCC; border-left:1px solid #99CCCC; float:left; } #menubar{ background-color:#FFFFFF; text-align:left; margin:0; padding:0; } #menubar li { display:block; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#FF9933; list-style:none; text-decoration:none; border-bottom:1px solid #99CCCC; cursor:default; line-height:27.5px; } #menubar a { display:block; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#FF9933; list-style:none; text-decoration:none; cursor:default; padding-left:5px; line-height:27.8px; } #menubar a.active { color:#99CCCC; } #menubar a:hover, #menubar a:focus, #menubar a:active{ color: #FFFFFF; background-color: #99CCCC; } #right { width:520px; height:390px; margin:15px 0 15px 0; border-top:1px solid #99CCCC; border-left:1px solid #99CCCC; float http://jjs5327.aisites.com/IMD311/index.html Does anyone have some suggestions that will make my sites <div>'s look the same in both IE and FF? So, I have an app that allows the user to select images from a list of thumbnails. The thumbnails have an 'on' and 'off' state, but also have a drop shadow. I can get the drop shadow to render nicely in IE6 using a PNG hack, but I can't seem to find a hack that will allow me to use a PNG sprite so I can have the on and off state in the same image. Any suggestions would be great. Hello, I have used the containment hack in several of my projects. However I found examples where they use "<div style="clear:both"></div>". The result is the same. So which one should I use? |