# Open Sans 300 在自定义头部

**URL:** https://meta.discourse.org/t/open-sans-300-in-custom-header/55794
**Category:** Support
**Created:** [2017年一月15日 08:00 UTC](https://meta.discourse.org/t/open-sans-300-in-custom-header/55794 "2017-01-15T08:00:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![harveywun](https://avatars.discourse-cdn.com/v4/letter/h/a88e57/32.png) [@harveywun](https://meta.discourse.org/u/harveywun)
#### Post date: [2017年一月15日 08:00 UTC](https://meta.discourse.org/t/open-sans-300-in-custom-header/55794/1 "2017-01-15T08:00:47Z")

</div>

Trying to add a custom header (to match my primary site and take users back, if needed). My brand logo uses Open Sans 300 light (with 4px letter spacing, not important). So:

`@import url(http://fonts.googleapis.com/css?family=Open+Sans);`

Then I style it:

```
.top-brand-nav-link {
  font-family: "Open Sans";
  font-weight: 300;
  font-size: 25px;
  letter-spacing: 4px;
}

```

Anyway, it all works and the header looks fine except that the font weight is off! It gives me Open Sans 400 (not 300)! I’m a little puzzled because when I change font-weight to 600 (semibold) or 700 (bold), it gets styled correctly (so my code should be fine). Obviously 400 is fine, but I cannot seem to get it to 300 (light). 300 just gives me 400.😓

Any idea why?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2017年一月15日 08:06 UTC](https://meta.discourse.org/t/open-sans-300-in-custom-header/55794/2 "2017-01-15T08:06:21Z")

</div>

if you need 300 weight your import url should be like below I guess

```css
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400');

```

see [https://fonts.google.com/specimen/Open+Sans?selection.family=Open+Sans:300,400](https://fonts.google.com/specimen/Open+Sans?selection.family=Open+Sans:300,400)

---

<div class="post-metadata">

### Author: ![harveywun](https://avatars.discourse-cdn.com/v4/letter/h/a88e57/32.png) [@harveywun](https://meta.discourse.org/u/harveywun)
#### Post date: [2017年一月15日 08:15 UTC](https://meta.discourse.org/t/open-sans-300-in-custom-header/55794/3 "2017-01-15T08:15:12Z")

</div>

That worked. Thanks for the quickest reply ever.

Quick followup - why does 600, 700 weight work without the need to specify it in the import url? Asking just for personal learning reasons.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2017年一月15日 08:23 UTC](https://meta.discourse.org/t/open-sans-300-in-custom-header/55794/4 "2017-01-15T08:23:27Z")

</div>

> [@harveywun](#):
>
> why does 600, 700 weight work without the need to specify it in the import url?

Maybe you are viewing fall-back font or your system having that font already.  
you can see in source code here [http://fonts.googleapis.com/css?family=Open+Sans](http://fonts.googleapis.com/css?family=Open+Sans). It only having source definitions for 400 weight.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024年六月8日 12:45 UTC](https://meta.discourse.org/t/open-sans-300-in-custom-header/55794/5 "2024-06-08T12:45:02Z")

</div>

此主题已在 2701 天后自动关闭。不再允许回复。
