Would someone explain what this CSS (whatever it is) code means?

eg:

<b>position: relative</b> }              /* 1 */

Kinda hard to see, it’s that faint bit hanging out to the right, namely:

/* 1 */

? Thanks everyone.

It’s a HTML comment. If you put those around either code or content, a browser won’t make any use of it - in this case the number 1 won’t get displayed.

I’m not too sure about that spare curly brace though - is this just a snippet from a larger piece of code?

Try again :stuck_out_tongue: .

It would presumably mark the end of the declaration block/rule.

whoops, my bad…

Let’s try a CSS multi-line comment then. :blush:

Yup :slight_smile: . I should note that there are no single-line comments in CSS as well (as to not give OP the wrong idea.)

I’m nitpicky; sue me.

Where do I need to send the notification? :stuck_out_tongue:

This must be serious. Spain vs Ryan Reese.

Wow. I didn’t know I was so important that I could count for a whole country :slight_smile:

1 Like

Sass and Less both implement them though. They won’t be included in the CSS output.

Christopher Walken.
Christopher Sitting.

Alright I don’t know where this post will be placed because I don’t know where the bottom of my thread is . . . I just wanted to thank everyone for explaining that this is a “Comment”. I was going to include a link for future reference (mine or anyone else’s) but I swear I couldn’t find this turkey —

/* Turkey */


— without entire paragraphs qualifying it one way or another. It’s 4 lousy keystrokes! Write an example already!

And if the following is also a “Comment” —

<!-- Son of Turkey -->

then I don’t know why I couldn’t find two simple examples with Google. I’ll leave because I’m in a pissy mood. Thank you everyone.

I was going to include a link for future reference (mine or anyone else’s)

/* CSS block or line comment */

<! – HTML comment →

// Javascript line comment and
/* Javascript block
comment */

then I don’t know why I couldn’t find two simple examples with Google.

Tags are not content for a search engine, thats why. And I don’t know any global code search engine thats available without an account, sorry.

1 Like

There’s also

# “hash” comments

and

; semi-colon comments

REM comments not to mention

// also works in PHP

/* so does this */

# and so does this

Heck, we need to list every language, preprocessor, postprocessor, variation language, etc, ever invented and list the comments. Let’s go.

1 Like

I refer you to http://en.wikipedia.org/wiki/Comment_(computer_programming)

You mean for the main programming languages on the web… For Visual Basic, commeting is done using an apostrophe

' This is a VB comment