Sunday, September 16, 2012

CSS 101: Display inline-block not working on IE

Below is a simple post to help you with your IE problem.

There's a problem on IE when displaying element as inline that works perfectly on other browser. On IE, it will only works on elements that are relatively inline like span element.

For inline to work on other elements with IE, you just need to put safe on your display then set the zoom to 1. Please see tricks below.

.yourelement {
   display: inline-block;
   *display: inline;
   zoom:1;
}


Hope this helps on your IE issues. Happy coding!!

No comments:

Post a Comment