Skip to main content
Inspiring
Nov 29, 2019 5:24 PM UTC
Answered

Expected LBRACE at Line 1 col 2

Hi,

 

I am trying to write something to my main.css and I am getting the above error message.  Can anyone help me and the code in question is as follows

 

@11220649-face {
	font-family: 'HeyAlice' cursive;
	src: url("../fonts/HeyAlice-Regular.otf");
}

It is at the very top of the CSS.  Is that the correct place for it? 

This topic is closed to new replies. Start a new post to keep the conversation going.
Damo QuinnCorrect answer
Inspiring
Dec 2, 2019 3:11 PM UTC

I have had a friend who is a web developer down in Devon, UK, help me with it and between us, we have got it sorted.  Apparently there were 3 weird characters at the start when he looked at the CSS through a HexViewer.

8 replies

Jon Fritz
Community Expert
Community Expert
Dec 2, 2019 2:24 PM UTC

The error you are seeing is often caused by something in your code confusing DW's near useless Linter into marking lines of code that are otherwise fine. For example: having the odacity to use the fr unit when working with CSS Grid will throw that error.

Turn Linting off in your preferences and use the online resources like https://jigsaw.w3.org/css-validator/ for CSS validation and https://validator.w3.org/nu/ for HTML.

Translate
Damo QuinnAuthorCorrect answer
Inspiring
Dec 2, 2019 3:11 PM UTC

I have had a friend who is a web developer down in Devon, UK, help me with it and between us, we have got it sorted.  Apparently there were 3 weird characters at the start when he looked at the CSS through a HexViewer.

Translate
Legend
Nov 29, 2019 6:36 PM UTC

Normally you would insert a comma after the font-family like below:

@font-face {
	font-family: 'HeyAlice', cursive;
	src: url("../fonts/HeyAlice-Regular.otf");
}

 

However its just possibly that Dreamweaver does not understand @font-face {} and so throws a warning/error.

Linting is NOT totally reliable, often a warning or error is reported when there is not one.

 

 

Translate
Nancy OShea
Community Expert
Community Expert
Nov 29, 2019 8:06 PM UTC

@font-face throws no errors for me.  I think the comma is what's missing.

 

 

 

Translate
Nancy O'Shea— Product User & Community Expert
Inspiring
Nov 29, 2019 11:20 PM UTC

I saw that and corrected it.  I still am getting the error.

 

@font-face {
	font-family: 'HeyAlice', cursive;
	src: url("../fonts/HeyAlice-Regular.otf");
}

 

Translate