• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

CSS basic font commands ... help?

Joined
Jan 27, 2010
Messages
4,158 (0.80/day)
Location
USA
System Name ASUS ROG Zephrus M15
Processor AMD Rhyzen 7 4800HS
Memory 16GB
Video Card(s) Geforce RTX 2060
Storage 1TB
Code:
<div class="titles">
  <div style="font-size:120px"; "font-weight:900" ;>Boheme Bourgeois</div>
  
</div>

I cant get it to bold my font ... what am I missing? I am pretty sure I entered it in wrong, but where?
 

Kreij

Senior Monkey Moderator
Joined
Feb 6, 2007
Messages
13,817 (2.20/day)
Location
Cheeseland (Wisconsin, USA)
Your inline style properties should be inside a single pair of quotes, I think (been awhile since I did any html/css).

Code:
<div style="font-size: 120 px; font-weight: 900">Whatever</div>
 
Joined
Jan 27, 2010
Messages
4,158 (0.80/day)
Location
USA
System Name ASUS ROG Zephrus M15
Processor AMD Rhyzen 7 4800HS
Memory 16GB
Video Card(s) Geforce RTX 2060
Storage 1TB
Ah, ok I will try that out ... thanks!
 
Joined
May 27, 2012
Messages
329 (0.08/day)
Location
Malaysia
System Name Elmo
Processor i9 7900x
Motherboard MSI x299 gaming pro ac
Cooling Noctua NH D-14
Memory 32GB DDR4 3600 Mhz
Video Card(s) Zotac AMP Extreme RTX 2070 Super
Storage 1TB Samsung 860 Evo, Samsung 970 Evo Plus 500GB, 1 & 2TB Barracuda, Hyperx 120GB, WD Green 500GB
Display(s) Samsung 23" led 1080p X 3
Case Nzxt Switch 810
Power Supply Corsair HX 750W
Software Windows 10 Pro
why not use an external css? example .class {font-size: 120 px; font-weight: 900}
 
Joined
Nov 2, 2010
Messages
166 (0.03/day)
Location
Philippines! :D
System Name Noobie XTXx || Portalet Crap Machine
Processor i5 2500K @ 4.5, 1.345V || i7 2640QM
Motherboard ASUS P8P67 PRO || Dell
Cooling CM Hyper 212+ || Stock
Memory 2 x 2gb GSkill DDR3 9-9-9-24 || 8GB DDR3
Video Card(s) PowerColor 6970PCS @stock || Optimus (525m)
Storage WD Caviar Blue 500 + 320 Hitachi || 500GB
Display(s) LG W2253TQ || Crappy 1366*768 15"
Case CM 690 PURE Black
Audio Device(s) On Board
Power Supply ThermalTake Toughpower XT 775w
Software Win 7 64bit
Your inline style properties should be inside a single pair of quotes, I think (been awhile since I did any html/css).

Code:
<div style="font-size: 120 px; font-weight: 900">Whatever</div>


^^ That is pretty much it.

A piece of advice though, it is often better to have css definitions (either in the head or an external css) rather than inline ones as it makes it easier to change things around when necessary (and it also 'separates data from formatting')

Best of luck!
 

Kreij

Senior Monkey Moderator
Joined
Feb 6, 2007
Messages
13,817 (2.20/day)
Location
Cheeseland (Wisconsin, USA)
Yes, definition are usually a lot easier to manage, but if you have a lot of definitions for the overall site, and you know that the single line is the only place this particular font change is needed, it comes in handy to use inline on occasion.
 
Top