Search Blog Posts

Posts Tagged ‘internet explorer’

Transparent Boxes Using CSS

Tuesday, July 8th, 2008

Transparent boxes are becoming a common element to many new designs, as you will see our latest design is build around the design of 2 transparent boxes however this was done using png’s.

There are a number of ways to achieve this effect but today i will show a simple example of how to achieve this using CSS. I am not certain to what extent this code will work on all browsers but any feedback that you might have please let me know as i will include it in this post.

The below example will show a box using the background colour of white and an alpha of 50%.

Transparent Box CSS

#mydiv {
width: 300px;
height: 50px;
margin: 20px 0;
background-color: #ffff00;
/* Internet Explorer */
filter:alpha(opacity=60);
/* CSS3 standard */
opacity:0.6;
}

Here’s what it looks like

50%

30%

10%

Advantages

The only real advantage, but a good one, is that you no longer need to use images (e.g. pngs) for your backgrounds which could result in faster loading times for your web page.

Disadvantages

This may not work on all browsers, it certainly does for the most recent versions but how far back this technique goes back I’m not too sure. Using the code above you will also need to keep the width set, in IE it seems to break without it. But im sure there is a work around for this.

Min-height hack for Internet Explorer 6

Tuesday, April 22nd, 2008

Yes thats correct, another css hack for i.e 6 this time it’s ‘min-height’. As some of you are probably aware i.e 7 now supports the ‘min-height’ css property making our lives much simpler, or rather even more complicated as we have to create hacks or work arounds for old browsers such as i.e 6. 

Show below i have included the css for creating a div element with a minimum height, of course this could be applied to any element of your html document. For the div example that i am showing, this method is incredibly usefull when you have content that does not fill a specified area on your webpage. By using the min-height property you will effectivley allow your div to scale and expand but the hight will go no lower than the specified pixel size (e.g. 200px).

What you will see below is the basics of getting your div to display correctly on nearly all browsers (I haven’t managed to find any that dont support this method).

Example of min-height code

mydivname {
  min-height:200px;
  height:auto !important;
  height:200px;
}

Try it out and see how easy it is to use.

IE Only CSS Hacks and IE 6 or below Hack

Wednesday, February 20th, 2008

If you’ve created your website but want to style or change the formatting of your css depending on the users browser version, ie allows you to set a different css style sheet using this handy little hack.

Internet explorer recognises the following:

If you need to target any users browser that is just internet explorer simply use the follwoing code and place in your <head> </head> tags.

<!--[if IE]>
<link rel=”stylesheet” type=”text/css” href=”css/ie.css” mce_href=”css/ie.css” />
<![endif]–>

If you need to target any users browser that is internet explorer below version 7, e.g. 6, 5, 5.5… use the following code and place in your <head> </head> tags.

<!--[if lte IE 6]>
<link rel=”stylesheet” type=”text/css” href=”css/ie6orlower.css” mce_href=”css/ie6orlower.css” />
<![endif]–>

Css Sorted

Monday, March 12th, 2007

Design

After many hours coding the css is complete for the template for our business website.

Our corporate colours are
Orange and Black primarily with shades of grey.

The purpose of these colours are to portray our company as a fresh, vibrant and to give us a professional appearance.

Testing

We have tested the html and the css online today on the following:

  • PC and Mac

  • Internet explorer

  • Firefox

  • Netscape

So far there are no major problems/issues but we will continue to monitor this in the future however a few minor html mistakes have been spotted and will be sorted tonight .

© Copyright 2003-2008 Minimalistic Designs | Terms | Links | Sitemap
Website Design Liskeard - www.minimalistics.co.uk