I have attached my css in an external file "style.css" but, ocassionally when "View Source" is selected, it will display these styles using the <style> element. The first thing I can think of is that the <link> tag is incorrect in some way, but after that, I'm stumped. Code is as follows:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Chris Finazzo - Sandbox</title>
<link rel="apple-touch-icon" href="http://beta.chrisfinazzo.com/images/apple-touch-icon.png"/>
<link rel="stylesheet" type="text/css" href="http://beta.chrisfinazzo.com/css/style.css" />
  • To clarify, it should link to the stylesheet instead of using the <style> element. Chris Finazzo over 5 years ago
  • Do you have a staging link so we can actually see the problem? Abinadi Ayerdis over 5 years ago
  • When you say occasionaly, does this happen only on a certain device? A particular browser? Additionally, you don't need to use the type attribute on link tags in HTML5... danwellman over 5 years ago
  • I've only tested with Safari thusfar, not sure about Firefox, Chrome, or IE. Chris Finazzo over 5 years ago

1 answer

danwellman 5600
0
points

Are the styles still applied to the page?

I have been unable to find anything that can cause this to happen accidentally, especially as you describe the problem as occasional.

If the styles are still applied to the page, and the page still looks as intended, and it remains an occasional 'issue' I would be tempted to ignore it...Perhaps this is something to do with it being a webapp and webapps aren't always rendered in safari (or at least are rendered in a 'full-screen' mode)

Answered over 5 years ago by danwellman