1

Sorry for this noob question. What is the difference between

.nav.left

and

.nav .left

in CSS

2 Answers2

2

.nav .left means your are targeting .left within the .nav element like

<div class="nav><div class="left"></div></div>

Where as .nav.left means both classes are on the same element like

<div class="nav left"><div></div></div>

A quick google would have probably found you and answer to this, try taking a read of w3c schools its a good place to start http://www.w3schools.com/cssref/css_selectors.asp

Dominic Green
  • 10,142
  • 4
  • 30
  • 34
0

Different between

.nav.left ---> e.g. <div class="nav left"></div> two class in same div.

and

.nav .left ----> e.g. <div class="nav"><div class="left"></div></div> one .nav div is parent div and .left div is child

Ashley Medway
  • 7,151
  • 7
  • 49
  • 71
Jenti Dabhi
  • 870
  • 5
  • 11