Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 14, 2012 01:06 PM by garyhamett
Member
134 Points
161 Posts
Mar 30, 2012 05:53 PM|LINK
Hi everyone.
My media query for the css below works with the screen query, but does not work once I add the print query. Can someone point out what is wrong with my syntax ?
Thanks
@model Complaints.Models.ComplaintDB @{ Layout = null; } <!DOCTYPE html> <html> <head> <title>Complaint Report</title> <style type="text/css"> .legend { font-size:larger; font-weight:bold; } #main { margin-top:25; margin-left:125px; margin-right:125px; } @@media screen and (max-width:768px) { body { background:rgba(0,119,051,.90); } p { font-size:x-small; } .legend { font-size:x-small; } #main { margin-top:10; margin-left:10px; margin-right:10px; } } </style> <style type="text/css"> @@media print { body { background:rgba(100,119,051,.90); } p { font-size:xx-large; } } </style>
404 Points
82 Posts
Mar 31, 2012 10:24 PM|LINK
Hi,
Press F12 to display the Developer Tool in IE9.... you will probably see that IE9 uses Quirks mode rendering/parsing as the default....
the Document Type Declaration must be the FIRST no-blank line in a document for it to be recognised.
<!Doctype html>
@model Complaints.Models.ComplaintDB @{ Layout = null; } <<<<< what is this anyway?
296 Points
69 Posts
Nov 14, 2012 01:06 PM|LINK
Looks to me like your media query is not syntactically corrent.
You need only one @ symbol infront of the media query. you aer using @@.
Try removing one of them and see the results.
bgreer5050
Member
134 Points
161 Posts
CSS Media Print Not Working
Mar 30, 2012 05:53 PM|LINK
Hi everyone.
My media query for the css below works with the screen query, but does not work once I add the print query. Can someone point out what is wrong with my syntax ?
Thanks
@model Complaints.Models.ComplaintDB @{ Layout = null; } <!DOCTYPE html> <html> <head> <title>Complaint Report</title> <style type="text/css"> .legend { font-size:larger; font-weight:bold; } #main { margin-top:25; margin-left:125px; margin-right:125px; } @@media screen and (max-width:768px) { body { background:rgba(0,119,051,.90); } p { font-size:x-small; } .legend { font-size:x-small; } #main { margin-top:10; margin-left:10px; margin-right:10px; } } </style> <style type="text/css"> @@media print { body { background:rgba(100,119,051,.90); } p { font-size:xx-large; } } </style>iecustomizer
Member
404 Points
82 Posts
Re: CSS Media Print Not Working
Mar 31, 2012 10:24 PM|LINK
Hi,
Press F12 to display the Developer Tool in IE9.... you will probably see that IE9 uses Quirks mode rendering/parsing as the default....
the Document Type Declaration must be the FIRST no-blank line in a document for it to be recognised.
<!Doctype html>
@model Complaints.Models.ComplaintDB @{ Layout = null; } <<<<< what is this anyway?
garyhamett
Member
296 Points
69 Posts
Re: CSS Media Print Not Working
Nov 14, 2012 01:06 PM|LINK
Looks to me like your media query is not syntactically corrent.
You need only one @ symbol infront of the media query. you aer using @@.
Try removing one of them and see the results.
"Keeping it clean, simple and FUN"