www.webdeveloper.com
Results 1 to 2 of 2

Thread: default font size set in html or body tag in css?

  1. #1
    Join Date
    Jul 2006
    Posts
    110

    default font size set in html or body tag in css?

    After all these years I am back asking the proper method of specifying my font sizing in my css pages. Would this make sense to this..
    Code:
    html {
    	height:100%;
    	font-family: "Century Gothic", Arial, Helvetica, sans-serif;
    }
    
    body {
    	margin: 0px;
    	padding: 0;
    	background-image: none;
    	background-repeat:repeat;
    	background-color: #000;
    	font-family: "Century Gothic", Arial, Helvetica, sans-serif;
    	color:#000;
    	font-size: 62.5%;
    }
    
    #container{
    	width:872px;
    	margin:0 auto;
    	background-color: #fff;
    	border-right:3px solid #3160ac;
    	border-left:3px solid #3160ac;
    	font-size:1.4em;
    }
    h1 {
    	margin: 0;
    	font-family: "Papyrus", Arial, Helvetica, sans-serif;
    	font-size: 2.75em;
    	padding-top:20px;
    	margin-bottom:6px;
    	color:#3160ac;
    	font-weight:bold;
    }
    This link I'm using % and em http://lambs.awardspace.com/index-two.php and this one I've used px http://lambs.awardspace.com/index.php Does anyone see any differance or problems with one or the other?
    And I am also questioning using "Papyrus" (specified by the client but what would I use for the actual font-family here?
    Last edited by catfish; 03-01-2013 at 02:29 AM.

  2. #2
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,217
    In Fx, I noticed a shift in menu text sizes, but body text sizes seemed to stay the same. As for the Papyrus font, any non-standard font that is not installed on users' computers would not be seen unless embedded on server. There are errors in HTML coding which should be corrected.

    Personally, I would just use:

    Code:
    * { margin: 0; padding: 0; border: }
    
    html, body { 
    background: #000;
    font-family: "Century Gothic", Arial, Helvetica, sans-serif;
    color:#000;
    font-size: 62.5%;
    }
    Set width/height in keeping with CSS rules. Might help:

    Care With Font Size: http://www.w3.org/QA/Tips/font-size

    Websites Shouldn’t Look The Same Across Different Browsers: http://www.noupe.com/design/websites...re-is-why.html
    Cross-Browser CSS in Seconds with Prefixr: http://net.tutsplus.com/articles/new...-with-prefixr/
    Responsive Web Design Demystified: http://www.elated.com/articles/respo...n-demystified/
    Responsive Web Design: 5 Handy Tips: http://www.elated.com/articles/respo...-5-handy-tips/
    Last edited by Major Payne; 03-04-2013 at 04:11 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles