i stumped why doesn't work. seems html file can't load css reason, though both in same directory.any idea might problem?
index.html
code:
<!doctype html> <html> <head> <title>home page</title> <link rel="stylesheet" href="style.css" media="screen" /> <meta name="viewport" content="width=1100"> </head> <body> <div id="main"> hello </div> </body> </html>
and style.css in same directory
code:
body{ background-color: #f9f9f9; background-image: url(images/bg3.png); background-position: center top; background-repeat: repeat; text-shadow: #ffffff 0px 1px 0px; font-family: "georgia", "times", serif; -webkit-font-smoothing: antialiased; } a{ text-decoration: none; } #main{ margin: 50px auto 50px auto; width: 1000px; min-height: 500px; padding: 0px 20px 0px 20px; } however, works
code:
<!doctype html> <html> <head> <title>homepage</title> <style type="text/css" media="screen"> body{ background-color: #f9f9f9; background-image: url(images/bg3.png); background-position: center top; background-repeat: repeat; text-shadow: #ffffff 0px 1px 0px; font-family: "georgia", "times", serif; -webkit-font-smoothing: antialiased; } a{ text-decoration: none; } #main{ margin: 50px auto 50px auto; width: 1000px; min-height: 500px; padding: 0px 20px 0px 20px; } </style> <meta name="viewport" content="width=1100"> </head> <body> <div id="main"> hello </div> </body> </html>
is called style.css, not style.css or similar?
Forums Special Interests Web Design and Development
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment