I have spent far too many hours searching the internet for a possible solution but have had no luck.

I am trying to make a change to my SharePoint master page.

I would like this:

```
div#s4-ribbonrow {
min-height: 0px !important;
height: 24px !important;
}

```

to be implemented in javascript (I want to be able to apply the code above conditionally).

I have tried:

```
<script type="text/javascript">
$(".s4-ribbonrow").attr('style', 'minHeight:0px !important');
$(".s4-ribbonrow").attr('style', 'height:24px !important');
</script>

```

and:

```
<script type="text/javascript">
document.getElementById('s4-ribbonrow').style.cssText = 'minHeight:0px !important';
document.getElementById('s4-ribbonrow').style.cssText = 'height:24px !important';
</script>

```

and *many* variations of this, but have not gotten anywhere!

The CSS itself works, so I'm sure there must be a reason why the javascript itself is not working.

Any help would be greatly appreciated!

Thanks,

Jon