I am utilizing Eric Meyer's reset.css file, which can be found at this link:
Interestingly, my <em>
definition in my main stylesheet is working perfectly fine on all browsers except Safari. Somehow, only in Safari, the styling for italics is not being applied as expected.
The temporary solution I have discovered is to remove the "em" from the reset.css file. Surprisingly, removing it doesn't cause any issues with other browsers and successfully resolves the <em>
display problem in Safari.
Has anyone else encountered a similar issue with Safari, and does anyone have a better suggestion to fix this rather than just deleting "em" from the reset.css?
SOURCE CODE FOR TESTING
Below is the content of a file that references three CSS files. The font definitions are displayed correctly in all browsers except for Safari. It seems that only by removing the em
definition from RESET.CSS will italic fonts show correctly in Safari. Why is that?
[index.php]
<link rel="stylesheet" type="text/css" href="reset.css" />
<link rel="stylesheet" type="text/css" href="fonts.css" />
<link rel="stylesheet" type="text/css" href="site.css" />
<p>This should be Muli Roman</p>
<p><em>This should be Muli Italics</em></p>
<p><strong>This should be Open Sans Bold</strong></p>
<p><em><strong>This should be Open Sans Italics</strong></em></p>
[reset.css]
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn,
img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section{display:block;}
body{line-height:1;}
ol, ul{list-style:none;}
blockquote, q{quotes:none;}
blockquote:before, blockquote:after,
q:before, q:after{content:'';content:none;}
table{border-collapse:collapse;border-spacing:0;}
[fonts.css]
@font-face{font-family:'Roman';font-weight:400;font-style:normal;src:url('http://fonts.gstatic.com/s/muli/v7/BkuZCUxEYxRfSu-XBj9_CA.eot');src:url('http://fonts.gstatic.com/s/muli/v7/BkuZCUxEYxRfSu-XBj9_CA.eot?#iefix') format('embedded-opentype'),
local('Muli'),
local('Muli-regular'),
url('http://fonts.gstatic.com/s/muli/v7/zscZFkjVRGyfQ_Pw-5exXPesZW2xOQ-xsNqO47m55DA.woff2') format('woff2'),
url('http://fonts.gstatic.com/s/muli/v7/minRpKQdEvXRRS8oAbAtWvesZW2xOQ-xsNqO47m55DA.woff') format('woff'),
url('http://fonts.gstatic.com/s/muli/v7/BfQP1MR3mJNaumtWa4Tizg.ttf') format('truetype'),
url('http://fonts.gstatic.com/l/font?kit=5laWPvb-IgmGJk9r92y1Hw#Muli') format('svg');}
@font-face{font-family:'Italic';font-weight:400;font-style:italic;src:url('http://fonts.gstatic.com/s/muli/v7/vurWTAYiHMPVScIey50dUQ.eot');src:url('http://fonts.gstatic.com/s/muli/v7/vurWTAYiHMPVScIey50dUQ.eot?#iefix') format('embedded-opentype'),
local('Muli Italic'),
local('Muli-italic'),
url('http://fonts.gstatic.com/s/muli/v7/YxNEAWILjDc466nftZdqXuvvDin1pK8aKteLpeZ5c0A.woff2') format('woff2'),
url('http://fonts.gstatic.com/s/muli/v7/DSOyST5zmfghBgRIogdupevvDin1pK8aKteLpeZ5c0A.woff') format('woff'),
url('http://fonts.gstatic.com/s/muli/v7/AQQ1r0_czneVCtTD9ckSEA.ttf') format('truetype'),
url('http://fonts.gstatic.com/l/font?kit=Ok1ULmeTg1kfss3jIu3xZQ&skey=f22af9a5d2e9fc47#Muli') format('svg');}
@font-face{font-family:'Bold';font-weight:600;font-style:normal;src:url('http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSnZ2MAKAc2x4R1uOSeegc5U.eot');src:url('http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSnZ2MAKAc2x4R1uOSeegc5U.eot?#iefix') format('embedded-opentype'),
local('Open Sans Semibold'),
local('Open-Sans-600'),
url('http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShampu5_7CjHW5spxoeN3Vs.woff2') format('woff2'),
url('http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSqRDOzjiPcYnFooOUGCOsRk.woff') format('woff'),
url('http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSonF5uFdDttMLvmWuJdhhgs.ttf') format('truetype'),
url('http://fonts.gstatic.com/l/font?kit=MTP_ySUJH_bn48VBG8sNSllIn5tFQcqMuf-jhyJP0ps#OpenSans') format('svg');}
@font-face{font-family:'BoldItalic';font-weight:600;font-style:italic;src:url('http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxo8mkAiYpFywqG2RvpzBnTU.eot');src:url('http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxo8mkAiYpFywqG2RvpzBnTU.eot?#iefix') format('embedded-opentype'),
local('Open Sans Semibold Italic'),
local('Open-Sans-600italic'),
url('http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxsiAiQ_a33snTsJhwZvMEaI.woff2') format('woff2'),
url('http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxuw_rQOTGi-AJs5XCWaKIhU.woff') format('woff'),
url('http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxi8cqLH4MEiSE0ROcU-qHOA.ttf') format('truetype'),
url('http://fonts.gstatic.com/l/font?kit=PRmiXeptR36kaC0GEAetxuVmfClkf66xvxL1SWm4y8M#OpenSans') format('svg');}
[site.css]
p {line-height:1.875;padding:0 0 0.75em 0;}
body, .roman{font-family:'Roman', Arial, sans-serif;}
em, i, .italics{font-family:'Italic', Arial, sans-serif;}
strong, b, .bold {font-family:'Bold', Arial, sans-serif;}
em strong, strong em, ib, bi, .italics .bold, .bold .italics {font-family:'BoldItalic', Arial, sans-serif;}