# CSS Trouble

**URL:** <https://forum.kirupa.com/t/css-trouble/51069>\
**Category:** web dev\
**Created:** [May 9, 2004, 4:35pm UTC](https://forum.kirupa.com/t/css-trouble/51069 "2004-05-09T16:35:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voetsjoeba](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Voetsjoeba](https://forum.kirupa.com/u/Voetsjoeba)\
**Post date:** [May 9, 2004, 4:35pm UTC](https://forum.kirupa.com/t/css-trouble/51069/1 "2004-05-09T16:35:37Z")

</div>

Hi Kirupians 🙂

```
  I have 3 problems with CSS. 
  
  1) -- fixed.

```

1. I need to change some of the CSS properties using JavaScript - I need the amount of visible pixels of the page. I know how to do this with JavaScript and this works in both browsers (luckily), but I can’t seem to set the CSS. At least, not in Mozilla, I managed to do it in IE with this code:

```php

      
      document.styleSheets[0].rules[0].style.height = (document.body.offsetHeight+71)+"px";
      
      

```

```
  This works for IE, but not for Mozilla. Does anyone know how to make it work for Mozilla ?
  
  3) Darn ... I forgot ... I'll update when it pops back into my head.
  [size=1]I forget way too much ...[size=2]

```

Oh I remember ! I wanted to load in the css from an external file using

```php
<||link type="text/css" href="cssfile.css" rel="stylesheet" />

```

(again, think away the ||)  
Doing this screws up the entire layout. How come ?  
[/size][/size]
