On 06/08/2009, at 7:04 PM, Rainer Wagener wrote:

> Chris Blake schrieb:
>> Hi,
>>
>> After getting the website I created working in most browsers I saw
>> that it was not working in IE. I have made a hack that has fixed it  
>> in
>> IE:
>>
>>
>> <!--[if IE]>
>>
>>
>> td{
>> border: 1px solid #fff;
>> }
>>
>> #main .content{
>> padding: 0px;
>> margin-bottom: -20px;
>> }
>>
>>
>> <![endif]-->
>>
>>
>>
>> But now all the other browsers are showing the negative margin, and
>> they didn't need one in the first place.
>
> Seems like you put it in your css.
>
> It should work as intended in the HTML if you add a style declaration.
>
> Rainer
>
>
>



Hi and thanks for so far,

The site is made in Drupal (hence the td). Tonnes of weird markup and  
tags but we have only one hurdle left and then it is complete.

Without the hack the website works fine in most browsers (sorry I  
can't send a URL, not my choice I promise). The hack is only needed  
for IE, and makes it work in IE. However the other browsers are  
reading this hack too and creating a negative margin that is not  
needed and messing it all up. Maybe the browsers get a thrill out of  
knowing how IE is ballsing it up again?

David and Rainer, I originally tried it with, <style type="text/ 
css">and </style> but it didn't change a thing when I took it out so I  
left it out when I posted before. I have  checked the CSS, created by  
Drupal and there aren't any conditional comments <!-- but there are  
some /* ones, is that a problem? I will put the style declaration back  
in for good measure.

Adam, I will try and target 7 and below, will add that now. However, I  
am looking at it in 7, and it works. This is not the problem, the  
problem is why the other browsers are reading this hack.

UPDATE:
I have done those two things, and it now looks like this (this is in a  
separate style sheet, not in the head or amongst the code):

<!--[if lte IE 7]>

<style type="text/css">

td{
border: 1px solid #fff;
}

#main .content{
padding: 0px;
margin-bottom: -20px;
}

</style>

<![endif]-->

It works in IE, the problem is the other browsers, that do not need  
the hack, are reading it too.

Thanks, CB













______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to