hacks within CSS file

This is a discussion on "hacks within CSS file" within the Web Page Design section. This forum, and the thread "hacks within CSS file are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 1st, 2007, 15:04
Junior Member
Join Date: Dec 2005
Location: Dublin
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
hacks within CSS file

Hi,

Is there a way of using the hack

<!--[if IE]>

<![endif]-->

within css code, or is there an alternative? to comply with recent versions of IE and Mozilla
Reply With Quote

  #2 (permalink)  
Old Feb 1st, 2007, 15:13
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hacks within CSS file

The

Code: Select all
 <!--[if IE]>
 
<![endif]-->
you put in your HTML document to send another stylesheet with the modifications for IE. So ... stuff like widths or 3-pixel-jog that are buggy in IE, you would put them in there.

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-NL" xml:lang="EN-NL">

<head>
    <title>prosite | internet solutions</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
<link href="/css/styles.css" rel="stylesheet" type="text/css" media="all" />
    
    <!--[if IE 6]>
    <link href="/css/ie.css" rel="stylesheet" type="text/css" media="all" />
    <![endif]-->
    
</head>
<body>
...
</body>
</html>
Reply With Quote
  #3 (permalink)  
Old Feb 1st, 2007, 15:18
Junior Member
Join Date: Dec 2005
Location: Dublin
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hacks within CSS file

I only want to have one CSS file, is it possible to put the hack into the css file so that i can "override" the classes in the CSS and keep from having to have 2 CSS files called from the HTML
Reply With Quote
  #4 (permalink)  
Old Feb 1st, 2007, 17:03
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hacks within CSS file

Like someone posted in the other forum you asked this question at... you can do
Code: Select all
* html #theid {
...
}
But IMO... it's always best to separate those types of hacks into another stylesheet.
Reply With Quote
Reply

Tags
css, hack

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Noobish question regarding IE css "hacks" danielreid Web Page Design 4 Mar 25th, 2008 11:33
Creating a log file (text file) and an XML file using XSL kdelacruz Other Programming Languages 1 Nov 4th, 2006 21:12
phpBB hacks and tricks robertboyle PHP Forum 3 Jun 8th, 2006 13:29
Useful CSS "hacks" - Post any you have! rpgfan3233 Web Page Design 6 Oct 29th, 2005 14:51
How make Word file same as html file in ASP humair Classic ASP 5 Sep 24th, 2003 14:35


All times are GMT. The time now is 12:51.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43