• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

css

IE nasty black on jquery fade

January 9, 2012 by Webhead

Problem

Fading a semi-transparent image in or out causes the whole image to go black before or after fadeIn and fadeOut in IE only.

 

Solution

You can set the opacity before the fadeIn or fadeOut.

 

source: http://stackoverflow.com/questions/1284163/jquery-ie-fadein-and-fadeout-opacity
keywords:  jquery fadeout ie black

Filed Under: Coding Tagged With: css, IE crap, jquery

Make outer div expand with inner div

January 4, 2012 by Webhead

Problem

I have two divs, one inside the other. I make the inner div have a height of 100px. The problem is that the outer div does not expand to 100px.  Instead it stays at 0px height.

Solution

In order for the outer div to expand with the inner div, you must have the following:

  1. Don’t state a height
  2. Enclose elements with Float
  3. Don’t use absolute positioning

source: http://forums.devshed.com/css-help-116/trying-to-make-div-expand-as-div-within-expands-508432.html
keywords: css expand outer div

Filed Under: Coding Tagged With: css

No Shadow in Internet Explorer

December 30, 2011 by Webhead

Who Will Cry When You Die?

 

Problem

I need some shadows using CSS in the non-modern browsers IE 7 and IE 8.  I found that it can be done with the filter attribute using the following code:

  .shadow {
	/* For IE 8 */
	-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#444444')";
	/* For IE 5.5 - 7 */
	filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#444444');
}

 

However, when I apply this to one of my existing elements, it does not show.  WHY?

 

Solution

If you look in the IE Developer Tools, you’ll see something funny.  You’ll probably see that if your existing element already uses a filter like maybe a gradient.  You’ll see that either the gradient or shadow filter will be overwritten.  So basically, you can’t have one filter (like shadow)  in one CSS class and another filter (like gradient) in another css class and use them on the same html element.  They will overwrite each other like any other CSS attribute.  Good job Microsoft!

So what you have to do is just append the filters like so:

 

 

 

	/* For IE 8 */
	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#4CA4BE', endColorstr='#37819B');progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#444444')";
	/* For IE 5.5 - 7 */
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4CA4BE', endColorstr='#37819B') progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#444444');

 

 

Filed Under: Coding Tagged With: css, IE crap

IE z-index

December 14, 2011 by Webhead

Z-Index troubles for IE.    From what I got from the link below… don’t use position:relative as much as possible.  Once you use position:relative, it puts the element and all it’s children onto another stack and z-index will not work.

As far as I know this applies to IE 7 and earlier.  IE 8 seems to work similar to Firefox.  Can’t wait til the day IE 7 is dead.

 

searched:  ie z-index not working
source:  http://www.webmasterworld.com/css/3716455.htm

 

 

 

 

 

 

Filed Under: Coding Tagged With: css, IE crap

Font2Web

November 22, 2011 by Webhead

Problem

Using your own fonts with HTML 5 can be great, but different browsers require different font formats.  I only had the TTF  (True Type Font) file, but I also needed the otf, .eot, .woff and .svg files to be compatible with all browsers.

 

Solution

http://www.font2web.com.  Font 2 Web is a great website that does what it says.  It takes your TTF and gives you back a zip file with the other 4 files that you need.  It also gives you the CSS file needed for your custom @font-face.  You may notice that in the CSS file the local src has a smiley face character.   You can read more here on what that’s all about:  http://paulirish.com/2010/font-face-gotchas/#smiley.

Update:  Another solution is http://www.fontsquirrel.com.  However, even if you have all font format files, it still may not work in all browsers and all OS’s.  I believe one issue is the EOT licensing issue for IE.  Microsoft use EOT format so that font licenses can be verified so maybe I’m using un-licensed fonts.  The only fonts that have worked consistently for me are Google’s Web Fonts.

Filed Under: Coding, Tools Tagged With: css, html 5

IE Takes Time

September 1, 2011 by Webhead

IE has officially forced me to spend 50% more time to complete a project.  Bugs, workarounds, special IE filters, all contributed to the time.  The last 3 or 4 projects, I tracked my hours spent on IE.  Maybe Microsoft secretly hates other developers.

I have a new example demonstrating a few HTML 5 features like:

  • gradient
  • vertical text
  • shadow

Of course, IE is not yet a “modern” browser so it needs to use it’s little “filter” hack.  Leave it to IE to have a bug in it’s own hack.  Gradients and Shadows cannot be shown at the same time.  I haven’t really found a workaround yet.

http://mymonkeydo.com/example/chart_gradient_vtext_shadow.html

Filed Under: Random Thoughts Tagged With: css, html 5, IE crap, jquery

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 3
  • Go to page 4
  • Go to page 5
  • Go to page 6
  • Go to page 7
  • Go to page 8
  • Go to Next Page »

Primary Sidebar

Topics

apache apple bootstrap buddypress chrome cloudways cms css debug drupal eCommerce firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery kinsta linux localization mac os x ms sql mysql open source optimize php php 7.2 svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized