The Raleway font adds an extra addition to the top of the text for Windows only

I use the Raleway font provided by Google Web Fonts, and I found that on my Windows 7 machine (tested with IE9, Firefox, Chrome, Safari) adding add-ons is added to the top of the text. When I test this on my Mac (tested with Firefox, Chrome, Safari), everything is fine. If I chose a different font from Google Web Fonts, that’s fine (at least with the ones I checked). Has anyone else ever come across this and knew how I can fix this?

HTML

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title><?php bloginfo('name'); ?> - <?php bloginfo('description'); ?></title> <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" /> <link href="http://fonts.googleapis.com/css?family=Raleway:100&v1" rel="stylesheet" type="text/css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script> </head> <body> <p class="test"> Hello World </p> </body> </html> 

CSS

 body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;} body { font-size: 62.5%; } .test { font-family: 'Raleway', sans-serif; font-size: 4em; text-transform: lowercase; font-weight: normal; font-style: normal; background: rgb(0,0,0); background: rgba(0,0,0,0.5); color: #fff; } 

enter image description here

+3
source share
2 answers

Jarads' solution of adding a line height of 0.8 and a bottom fill of 8px resolved the problem in IE9 but did not solve the problem in every other browser. So I only create IE CSS with a Jarads solution, and now everything is fine.

0
source

Different browsers will have different default settings for things like indentation, margins and line heights. Make sure you have reset default styles the same.

0
source

All Articles