# Themes not working

**URL:** https://discuss.codemirror.net/t/themes-not-working/1164
**Category:** Uncategorized
**Created:** [March 12, 2017, 6:31pm UTC](https://discuss.codemirror.net/t/themes-not-working/1164 "2017-03-12T18:31:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Alaa](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@Alaa](https://discuss.codemirror.net/u/Alaa)
#### Post date: [March 12, 2017, 6:31pm UTC](https://discuss.codemirror.net/t/themes-not-working/1164/1 "2017-03-12T18:31:48Z")

</div>

I followed the demos, and themes were working correctly. Now I updated CodeMirror to the newest vesion, and themes are not working ! I am not sure if the problem was due to the update or if there’s something wrong with my code. I am using [ASP.NET](http://ASP.NET) MVC 5 , here is my code:

```
<script src="/Scripts/codeMirror-2.37/lib/codemirror.js"></script>
<script src="/Scripts/codeMirror-2.37/mode/clike/clike.js" type="text/javascript"></script>
<link href="/Scripts/codeMirror-2.37/lib/codemirror.css" rel="stylesheet" type="text/css" />
<link href="~/Scripts/codeMirror-2.37/theme/lesser-dark.css" rel="stylesheet" type="text/css" />

<div class="CodeMirror cm-s-lesser-dark cm-error cm-bracket" style="position:absolute;top:150px;left:400px;width:700px;">
 @using (Html.BeginForm())
    {
        @Html.TextArea("code","public class Alaa",new { id = "code" })
    }

</div>

<script>

    var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
        lineNumbers: true,
        matchBrackets: true,
        mode: "text/x-java",
        lineWrapping: true,

    });

</script>

```

And this is the result I’ve got

 ![](https://discuss.codemirror.net/uploads/default/original/1X/b19efb471060d95263b85804bf34d2a97e1aeed7.JPG) 

What am I doing wrong؟

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)
#### Post date: [March 12, 2017, 7:57pm UTC](https://discuss.codemirror.net/t/themes-not-working/1164/2 "2017-03-12T19:57:41Z")

</div>

You don’t seem to be setting the `theme` option.

---

<div class="post-metadata">

### Author: ![Alaa](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@Alaa](https://discuss.codemirror.net/u/Alaa)
#### Post date: [March 12, 2017, 8:26pm UTC](https://discuss.codemirror.net/t/themes-not-working/1164/3 "2017-03-12T20:26:09Z")

</div>

Now themes work, but looks like it creates another textarea rather than rendering the required one. Can you help with that?

 ![](https://discuss.codemirror.net/uploads/default/original/1X/4a6595dc9bed1e27e9477ed6110ec94991786932.JPG)
