You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by ug...@apache.org on 2004/04/23 09:18:28 UTC

cvs commit: cocoon-2.1/src/blocks/linotype/samples/styles main.css

ugo         2004/04/23 00:18:28

  Modified:    src/blocks/linotype/samples/styles main.css
  Log:
  Added CSS workaround for missing suppor of position:fixed in IE6.
  
  Revision  Changes    Path
  1.5       +35 -1     cocoon-2.1/src/blocks/linotype/samples/styles/main.css
  
  Index: main.css
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/samples/styles/main.css,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- main.css	5 Apr 2004 11:43:33 -0000	1.4
  +++ main.css	23 Apr 2004 07:18:28 -0000	1.5
  @@ -43,13 +43,16 @@
    
   /* ----------------------------- Global Definitions -------------------- */
   
  +@media screen
  +  {
  +  
   body {
       margin: 0px;
       padding: 0px;
   	font-family: "georgia", "times", "times new roman", serif;
       color: #222;
       background-color: #fff;
  -    font-size: 12px;
  +    /* font-size: 12px; */
       quotes: "\201C" "\201E" "\2018" "\2019";
   }
   
  @@ -85,6 +88,16 @@
       font-weight: normal;
   }
   
  +h1 a:link, h1 a:visited {
  +    text-decoration:none;
  +    color: #000;
  +}
  +
  +h1 a:hover {
  +    text-decoration:none;
  +    color: #555;
  +}
  +
   h2 {
       font-family: "verdana", "helvetica", "arial", sans-serif;
       letter-spacing: 0.15em;
  @@ -438,3 +451,24 @@
   .body q:after {
   	content: close-quote;
   }
  +
  + /* 
  +  * Workaround for missing suppport of position:fixed in IE6
  +  * From http://devnull.tagsoup.com/fixed/
  +  */
  +  * html
  +    {
  +    overflow-y: hidden;
  +    }
  +  * html body
  +    {
  +    overflow-y: auto;
  +    height: 100%;
  +    font-size: 100%;
  +    }
  +  * html #sidebar
  +    {
  +    position: absolute;  
  +    }
  +  /* All done. */
  +  }
  \ No newline at end of file
  
  
  

Re: cvs commit: cocoon-2.1/src/blocks/linotype/samples/styles main.css

Posted by Ugo Cei <u....@cbim.it>.
Joerg Heinicke wrote:
> As IE also ignores the selector, position: fixed is never applied.
> 
>  From what I can see with the current workaround position:fixed is 
> neither used in other browsers, is it?

Don't ask me how it works, I just found it doing a Google search for 
"CSS IE position: fixed". It looks fine in Mozilla/IE 6/Safari, but IE 
5.2 for the Mac does not recognize the "@media screen" rule and does not 
  apply any style.

If you think your solution is easier, please apply it. I'm not a purist, 
so it's fine as long as it works.

	Ugo


Re: cvs commit: cocoon-2.1/src/blocks/linotype/samples/styles main.css

Posted by Joerg Heinicke <jo...@gmx.de>.
On 23.04.2004 09:18, ugo@apache.org wrote:

> ugo         2004/04/23 00:18:28
> 
>   Modified:    src/blocks/linotype/samples/styles main.css
>   Log:
>   Added CSS workaround for missing suppor of position:fixed in IE6.

Just yesterday I came across the same thing and found probably an easier 
workaround:

http://www.w3.org/Style/banner.css

Instead of using

div.banner {
   position: fixed;
}

you write

div.banner {
   position: absolute;
}

* > div.banner {
   position: fixed;
}

As IE also ignores the selector, position: fixed is never applied.

 From what I can see with the current workaround position:fixed is 
neither used in other browsers, is it?

Joerg