Html tag queshtion

Html tag queshtion
0.0 0

#1

Hi,

I saw a snippet and in tge html code were,

.weather
.weather-temp
%span etc

  1. Why using “.name” and then in the next line .name-name ?
    2.Why didn’t the code <> in it?

Can someone eplain it for me?


#2

It looks like .weather and .weather-temp are two separate CSS classes. In CSS it is common practice to use a hyphen when a class name must be more than one word. Hope that helps.


#3

but he wrote it in html
and in seperate, he styled it in css…


#4

That’s really weird. He’s using HTML without any tags. I’ve never seen anything like that before.


#5

It’s not HTML, its a language that compiles to HTML (Pug, Slim and HAML use a syntax like that).

#foo
.foo
.foo.bar
%span foo

Compiles to

<div id="foo"></div>
<div class="foo"></div>
<div class="foo bar"></div>
<span>foo</span>

#6

mm… thank you for clearing it out for me :slight_smile:


#7

@DanCouper is right. At 0:14, the user selected Haml as the HTML preprocessor in codepen.


#8

On another subject, maybe one of you can help me,
I’m trying to move all of my menu from one side to another, and I can’t figure it out for day now.
I succeeded to fix other bugs :slight_smile: but not that bugger,
This is my code,


#9

If I’m not mistaken, you could handle that with the CSS property float: right; on your toggler. You may have to adjust your positioning though.


#10

Ok, and where should I put it?


#11

After I did it, the menu is over the Hamburger btn, and I can’t see some of it when it is closed…
how can I fix that ? hhh