SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast Marcelo's Avatar
    Join Date
    Oct 2003
    Location
    Buenos Aires
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Font issue with CSS

    I have an external CSS where I set Verdana as main font for each body section for all pages.
    At the Dreamweaver MX design screen I can see it takes the change for Verdana but when I upload the pages and the external CSS as well as when I preview it will display all fonts in Times News Roman.

    I've digged enough all over the code but cannot find the error, if there is one...

    Any ideas? Thanks in advance,
    Last edited by Marcelo; Dec 27, 2003 at 23:54.
    Marcelo

  2. #2
    SitePoint Enthusiast Marcelo's Avatar
    Join Date
    Oct 2003
    Location
    Buenos Aires
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oops.. forgot to say, please enter at Spanish section since English section is not still available.

    Thanks again,
    Marcelo

  3. #3
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In your style sheet:
    Code:
    change this:
      	font: Verdana, "Courier New", "Times New Roman";
      
      to this:
      	font-family: Verdana, "Courier New", "Times New Roman";

  4. #4
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    change the .content definition in your css to
    Code:
    .content{
    	font: 14px Verdana, "Courier New", "Times New Roman", sans-serif;
    	padding: 10px;
    	font-weight:100;
    }
    don't ask me why, but having font and then font-size seems to confuse the browser. adding the font-size straight in the main font definition works.

    Edit:


    heh...too slow. bluey got in there with the other way around it
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  5. #5
    SitePoint Enthusiast Marcelo's Avatar
    Join Date
    Oct 2003
    Location
    Buenos Aires
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redux
    change the .content definition in your css to
    Code:
    .content{
    	font: 14px Verdana, "Courier New", "Times New Roman", sans-serif;
    	padding: 10px;
    	font-weight:100;
    }
    don't ask me why, but having font and then font-size seems to confuse the browser. adding the font-size straight in the main font definition works.

    Edit:


    heh...too slow. bluey got in there with the other way around it
    Hi redux, I cannot believe it works this way... it'd be nice to know why this happens.

    Thanks a lot!
    Marcelo

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    it'd be nice to know why this happens.
    Font is a shorthand property and the bare minimum for its use is the font-size and font-family values.

    Any Keyword values which are not given in the font declaration cause the corresponding properties to be reset to their default values.

    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •