Announcement

Collapse
No announcement yet.

Comments removed from header..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Comments removed from header..

    Hi,

    I have some css conditional comments in the header, but they are removed when I upload. Is it possible to turn this off?

    <!--[if !IE]>
    <style>
    #header { background-image:url('images/header.png');}
    </style>
    <![endif]-->

    Thanks,

    Steve

    #2
    Tricky. Try
    Code:
    <script>
    document.write('<!--[if !IE]><style>#header { background-image:url(\'images/header.png\');}</style><![endif]-->');
    </script>
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Ok got it, knew it was there somewhere. Design, design options, compact html. Switch it off.

      Thanks,

      Steve

      Comment


        #4
        That option will make your pages a lot bigger. Great for debugging but not really recommended for live sites.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Also see http://rafael.adm.br/css_browser_selector/ where you could extend the CSS so you can include the browser type in your definitions. E.g. the very clean looking

          .ie #header { background-image:url('images/header.png');}
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Its best to not use javascript here though, always try and be as valid as possible :-). Also, your intitial javascript idea doesn't work unfortunately. And that script doesn't seem to support ie7 selection. Anyone else have any ideas to force comments to be uploaded? That is all that is required.

            How much effect have you seen on page size / site speed when not using compact html? Doesn't seem to be affecting my page size too much. What does it remove anyway, comments and whitespace?

            Steve

            Comment

            Working...
            X