by
Janeth Kent
Date: 11-04-2013
Did you know that there are specific CSS hacks for IE that allow you to target IE8, IE7 and IE6?
We, web developers, are constantly faced with deficiencies of Internet Explorer, and CSS hacks allow to overcome them in most cases.
In this post I would like to group the CSS hacks for each of the popular versions of IE. Most likely you already know the CSS hacks for IE6 and IE7, but for IE8 and IE9 probably not. You would really love them because they are useful & help you get your design closer to pixel perfect.
CSS hack for Internet Explorer 6
~ Called as Star HTML Hack
.class {
_height:300px;
_width:300px;
}
OR
*html #div {
height:300px;
width:300px;
}
CSS hack for Internet Explorer 7
.class {
!height:300px;
!width:300px;
}
OR
*+html #div {
height:300px;
width:300px;
}
CSS hack for Internet Explorer 8
.class {
height/*\**/: 300px\9;
width: /*\**/: 300px\9;
}
OR
@media \0screen {
.class {
Padding-top: 10px;
}
}
CSS hack for Internet Explorer 9
:root .class {
Padding-top: 10px;
}
With these ! Or _ declarations, you can change the height, width, padding, margin etc any Css for IE6, IE7, IE8 & it won’t affect firefox & most other browsers.
CSS hack for FireFox
@ -moz-document url-prefix() {
.class {
Padding-top: 10px;
}
}
by
Janeth Kent Date:
11-04-2013
hits :
6672
Latest news from Hi-Tech world
The Payment Request API has emerged as the new standard for online payments, transforming the way transactions are conducted on the internet. In this two-part series, we will delve into…
Do you want to play your favorite Android games directly on your computer? If your answer is yes, you've come to the right place! In today's guide, I will explain…
The dark web, a hidden network accessed through the Tor browser, offers enhanced privacy and anonymity for websites. To establish a presence on the dark web, you can create a…
The Flight Tracker API provides developers with the ability to access real-time flight status, which is extremely useful for integrating historical tracking or live queries of air traffic into your…
Artificial intelligence (AI) is revolutionizing not just business and healthcare, but also the creative industries by introducing a new era of AI-generated art. The accessibility of AI technologies and tools…
Part 2: Advanced Features and Best Practices
In the first part of this series, we explored the fundamentals of the Payment Request API and how it simplifies the payment experience. Now,…
In recent years, the digital advertising industry has been undergoing significant transformations. One of the most impactful changes is the impending demise of third-party cookies, which could potentially diminish marketing…
In the world of Android smartphones, there exist numerous hidden codes that can unlock a treasure trove of functionalities and features. These codes, known as custom dialer codes, provide access…
Automation and technological advancements have raised concerns in some sectors about the possibility of robots taking away human jobs. While it is true that robots and artificial intelligence can perform…
In today's digital age, cybersecurity has become an essential concern for programmers. With cyber threats on the rise, it is crucial for programmers to adopt robust security practices to protect…
HTML5 Canvas is a technology that allows developers to generate real-time graphics and animations using JavaScript. It provides a blank canvas on which graphical elements, such as lines, shapes, images…
Inflation, the general rise in prices of goods and services, is a significant economic concern that impacts various industries, including technology. As we delve into 2023, marketing professionals in the…
Social media has revolutionized the way businesses connect with their audiences, allowing for instant communication and unprecedented reach. However, with great power comes great responsibility. As social media platforms continue…
Social media can offer modern businesses so many incredible opportunities. It can be used to reach new customers, build reputation, advertise new products, and connect with industry peers and partners.
However,…
A sleep()function is a function that allows you to stop the execution of code for a certain amount of time. Using a function similar to this can be interesting for…
Artificial Intelligence (AI) has become an increasingly prevalent force in our modern world, revolutionizing industries and enhancing numerous aspects of our lives. However, alongside the promises and potential benefits, concerns…
Today, we're going to talk about how to implement a simple language selector on the basic static website, without the need of any backend or database calls or redirection to…
In today's digital age, website performance plays a vital role in delivering an exceptional user experience.
Slow page load times can frustrate visitors, leading to high bounce rates and reduced engagement.…
In the realm of data centers and networking, the Open Compute Project (OCP) has emerged as a driving force for innovation and collaboration.
Founded by Facebook in 2011, the OCP aims…
This year has been a time of many changes. Now, more people are connected to the Internet through their home routers for teleworking, shopping, or leisure. This is where the…