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

CSS basic font commands ... help?

Discussion in 'Programming & Webmastering' started by copenhagen69, Jun 18, 2012.

  1. copenhagen69

    Joined:
    Jan 27, 2010
    Messages:
    3,926 (2.32/day)
    Thanks Received:
    1,243
    Location:
    USA
    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?
     
  2. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.99/day)
    Thanks Received:
    5,615
    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>
    
     
    copenhagen69 says thanks.
  3. copenhagen69

    Joined:
    Jan 27, 2010
    Messages:
    3,926 (2.32/day)
    Thanks Received:
    1,243
    Location:
    USA
    Ah, ok I will try that out ... thanks!
     
  4. Elmo

    Elmo

    Joined:
    May 27, 2012
    Messages:
    309 (0.37/day)
    Thanks Received:
    40
    Location:
    Malaysia
    why not use an external css? example .class {font-size: 120 px; font-weight: 900}
     
  5. Ev1LrYu

    Ev1LrYu

    Joined:
    Nov 2, 2010
    Messages:
    166 (0.12/day)
    Thanks Received:
    21
    Location:
    Philippines! :D

    ^^ 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!
     
  6. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (4.99/day)
    Thanks Received:
    5,615
    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.
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page