February 21, 200917 yr You want to have rounded edges that show the background which is an image not a solid colour. The background image rotates (as in its a different background each time), so you can't make the corners a jpeg, because it will show only one background. You dont want to make the corners a transparent png because of IE6 compatibility. How do you get round this?
February 21, 200917 yr The quick and dirty method is to use a transparent PNG and say to hell with IE6, though there are several hacks to make IE6 respect PNG transparency. On the other hand you could turn off anti-aliasing and make your corners transparent and save as a .gif or 8-bit PNG which IE6 will respect!
February 21, 200917 yr Author Cor, BlueDreamer, thanks for the quick reply, no wonder you were made Mod! Well... I am required to acknowledge IE6, which is the problem, and the quality of the background makes an 8bit .gif an issue. I assume that these hacks will not follow standards? What a pain this is...
February 22, 200917 yr Most of the hacks will validate if that is what you mean by following standards, however the require JS, this one is in my opinion the best: http://jquery.andreaseberhard.de/pngFix/ Another way if your images are being controlled by css is to have two sets of images one with rounded corners one without, then use a conditional statement and have it so that IE6 and below will display the none rounded corner images, so this way you are still considering IE6 and below but downgrading it to a slightly different design rather than using a JS hack. You would do this by placing the css you want to change into a different file and then calling that file like this <!--[if lt IE 7]> IE6 CSS file here <![endif]--> Basically what this says is if IE is lower than 7 use this style sheet. Within the style sheet you would have the different images for the divs you only need to have in this style sheet what you are wanting to change rather than everything, as long as it is below your other stylesheets it will use the changes in the conditional css so it would just look like this: #div1 { background-image: url(IE_image.gif); } There is also a way to do this without a hack or conditional statment, I have never used it so can't say if it would actually work or not but here is a link anyway, if you decide to try this let us know if it is as good as it seems http://www.brenelz.com/blog/2009/01/27/png...ncy-screencast/
February 22, 200917 yr Cor, BlueDreamer, thanks for the quick reply, no wonder you were made Mod! I assume that these hacks will not follow standards? IE6 doesn't follow standards so put in that sense any hack is not a standard! Dizi has a great explaination - IE7 supports PNG transparency so all you need to do is create an exception for IE6 as she describes
February 22, 200917 yr Author Thankyou both. Do you reccomend making conditional seperate CSS files, or just conditional statements in the same file?
February 22, 200917 yr the 8bit hack should work fine, there is some instances where it'll do not so well (such as where gradients, and complex semi-transparent pixels are involved). I've got the corners if that's any help to you (png-24 though, not tried in png8) (i'm assuming you want to make the corners of an image rounded, while the image itself will vary?). That's all i can add, i think these others have it covered (:
February 22, 200917 yr Author I dont think I am going to be using a javascript hack because I don't feel like it is done 'properly'. I want all the work to be my own, especially since I am developing for a big name. I will make an adaptive 8-bit PNG, I must admit I never knew this was possible. I will report back, thanks!
February 22, 200917 yr I should add that in an 8-bit PNG a pixels is either transparent or it's not - you can't do graudated transparency - in effect it's the same as a .gif
February 22, 200917 yr You could use a transparent .PNG for IE7 and then use conditional comments as suggested to point to an external ie.css stylesheet with specific instructions for IE6 to use a GIF. All users of IE6 will then have to make do with the lower quality version. Alternatively, you could have different rounded corners for each background and as the background rotates so do the corners but implementing this may be more trouble than it's worth. As suggested, you could use a JS method but those without JS or JS turned off, as most businesses may have it set up would not be able to see your design as intended. It is a tricky one. I suggest using CSS hacks to implement IE6 transparency, as Dizi has listed their are hacks that do validate but they can be tricky to implement and may not always work.
February 22, 200917 yr Forget having different versions of the site for ie6 and everything else. This is a pretty good solution, requires 1 line of code to call the file that handles the images and you're good to go. http://www.twinhelix.com/css/iepngfix/ You could even use the MS image filter filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image', sizingMethod='scale'); The only problem with this soultion is that you'd have to use it for each image, if you have multiple images on multiple boxes it could become a bit of a pain in the arse!
February 28, 200917 yr Hi 'SteveBrown', I think i have a soloution for you, i know it works in the latest IE and firefox but IE6 not sure about. Could give it ago Anyway not sure if you have hurd of it BUT its called nifty corners, ive use it once or twice, its good!! http://www.html.it/articoli/niftycube/index.html Hope this solves your problem!
Create an account or sign in to comment