K
K
Kusmich2015-10-30 13:22:58
css
Kusmich, 2015-10-30 13:22:58

Why don't they want to work 2 fonts at the same time?

There are 2 fonts that I include. But but they work current when I turn off one of them. What is the problem ? I connect like this:

@font-face {
    font-family: ThinCondensed; 
    src: url(../Fonts/Exo2-ThinCondensed.otf); 
   };
   
  @font-face { 
    font-family: LightCondensed; 
    src: url(../Fonts/Exo2-LightCondensed.otf); 
   };

  А к элементам добавляю так :

   .task_desc > h1 {
  font-size:41px;
  margin:21px auto;
  font-family: LightCondensed; 
}

.task_desc >  ul > li > h1 {
    font-family: ThinCondensed; 
  font-size:41px;
    padding-left: 88px;
}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
lnked, 2015-10-30
@Kusmich

Define font like this

@font-face {
  font-family: Condensed; 
  font-style: normal;
  font-weight: 100; /* Thin */
  src: url(../Fonts/Exo2-ThinCondensed.otf); 
}

@font-face { 
  font-family: Condensed; 
  font-style: normal;
  font-weight: 300; /* Light */
  src: url(../Fonts/Exo2-LightCondensed.otf); 
}

note without ";" after declaring font-face
use like this
body {
  font-family: Condensed; 
}

.task_desc > h1 {
  font-size:41px;
  margin:21px auto;
  font-weight: 300;
}

.task_desc >  ul > li > h1 {
  font-weight: 100;
  font-size:41px;
  padding-left: 88px;
}

Y
Yaroslav Lyzlov, 2015-10-30
@dixoNich

It is not clear from the source data. Make an example on jsfiddle with such a situation.

3
3luyka, 2015-10-30
@3luyka

And how are you going to use them in the future?

.el1 { font-family: ThinCondensed; }
.el2 { font-family: LightCondensed; }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question