Forum Moderators: not2easy

Message Too Old, No Replies

What is the font-weight used by many websites ?

         

Digmen1

10:09 am on Mar 16, 2009 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi Guys

I have noticed that many modern websites are using a very light font weight these days. (trying to look sophisticated ?)

Can any one tell me what it is ?

I have tried

font-wight:lighter; but this does not seem to work !

Is there a way to look at websites CSS like you can view the html code ?

Kind Regards

Digby

simonuk

10:41 am on Mar 16, 2009 (gmt 0)

10+ Year Member



The best way is to look at it using the Firebug add-on for FireFox. When you click on an element it will show you all the places it is pulling in the styles from and which one has overwritten all other rules.

The lighter rule refers to the font being one font weight lighter than the parent.

g1smd

10:42 am on Mar 16, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Get the Firebug extension for Firefox.

Allows you explore the HTML and CSS.

SteveWh

10:46 am on Mar 16, 2009 (gmt 0)

10+ Year Member



Firefox (or maybe it's the Firefox web developer toolbar?) has a command: View CSS. That's easy. It shows you all the CSS for the page, whether it's from the page itself or from external files.

In any browser, you can View Source of the page.
Any lines that say <style type="text/css"> mark the beginning of CSS code for that page.

In addition, you'll usually find a line
<link rel="stylesheet"...
The .css file referenced in that line is the external style sheet.

Edit: (As others pointed out, it is apparently Firebug that provides the View CSS feature.)

[edited by: SteveWh at 10:47 am (utc) on Mar. 16, 2009]

swa66

10:48 am on Mar 16, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Might just be a typo in your post here, but the correct syntax is:

font-weight:lighter

More info:
[w3.org...]

Interesting to read I always missed the fact that lighter and bolder mean to change the inherited value in a certain direction, and not set it to an absolute value. Thanks for pointing that out Simonuk!

swa66

10:52 am on Mar 16, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



web developer toolbar has a "view CSS" and "view style info": view CSS just shows all the CSS in one page, "view style info lets you click on any on page element and it'll show the CSS applied to it by the browser (so it gives an interpretation of what the browser thinks it is seeing).

Digmen1

5:50 pm on Mar 16, 2009 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks guys,

Looks like I'd better get Firebug. I am using Firefox so that's OK.

Gahein

7:14 pm on Mar 16, 2009 (gmt 0)

10+ Year Member



The firefox web developer toolbar has been the single most helpful tool to me in making websites. There's so much in it that I haven't even gotten to use yet.

This is the link. I recommend it 100%.

[addons.mozilla.org...]