Sublime Forum

Why can't I edit or apply styles to HTML?

#1

For some strange reason, I cannot edit or apply styles to html in Sublime Text 2. I cannot do internal styles or link to external styles. However, if I take code that I have done into Dreamweaver or Notepad++, the styles are applied and editable? How can I get sublime Text 2 to allow me apply and edit styles?

I have Windows 7 and I’m new to HTML and CSS. I’m trying to learn different code editors, but it’s quite difficult when the editors won’t work :frowning:

Thanks!

ETA: When I mean styles I mean css. I can’t view any css styling on my html page on Sublime text 2. Only when I use notepad++ or dreamweaver. I can’t see css in a browser when I use sublime text 2.

Here’s my code:

[code]

Untitled Document body{ background: orange; } [/code]
0 Likes

#2

I’m lost. If you save your code and view the page in a browser you will see an orange background :question:. What else are you expecting?

You can also create inline styles or attach a stylesheet and they will be applied when viewed in a browser, as long as the syntax is correct and an external stylesheet is saved in the correct location.

0 Likes