Sprites not displaying correctly in IE 6,7,8 - html

:-)
Smiley - face at the start there, but this is really irritating for me.
As you see from the title, THE POSITIONING OF THE ELEMENTS IN IE 6,7 AND 8(At least) is off. I'm including the direct url : http://evolvedtools.com/Genr8Mobi.html.
Now this page is normally a redirect from a full - size page, and on a reasonable browser (Read: everything bar Internet explorer) ,everything renders well. The page is meant for small format browser or mobile, but it has css for desktop also in separate stylesheet. Resize your browser window to see how it works.
Here's the html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Genr8</title>
<!--[if lt IE 9]>
<link href="PuzzleMobileIE.css" rel="stylesheet" type="text/css" media="screen and (max-width: 649px), screen and (max-width: 767px) and (min-device-height:320px)" id="stylesheet-PIEmob" >
<link href="DesktopIE.css" rel="stylesheet" type="text/css" media="screen and (min-width: 651px) and (min-height: 650px)" id="stylesheet-DTIE" >
<![endif]-->
<link href="PuzzleMobile.css" rel="stylesheet" type="text/css" media="screen and (max-width: 649px), screen and (max-width: 767px) and (min-device-height:320px)" id="stylesheet-Pmob" >
<link href="PuzzlePad.css" rel="stylesheet" type="text/css" media="screen and (min-width: 650px) and (max-width: 1024px)" id="stylesheet-Pad" >
<link href="Desktop.css" rel="stylesheet" type="text/css" media="screen and (min-width: 651px) and (min-height: 650px)" id="stylesheet-DT" >
<Script type="text/javascript" src="Scripts/js/Respond/Respond-master/dest/respond.min.js"></Script>
<Script type="text/javascript" src="Javascript Cookie Script.js"></Script>
<!--<Script type="text/javascript" src="Scripts/js/css3-mediaqueries.js"></script>-->
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
</script>
</head>
<body onload="MM_preloadImages('images/puzPlugin_56.png','images/HomeButton_03.png','images/AnimasjonMotsatt.gif','images/puzzleGenr8SpriteFull.png','images/Spritepuz1.png')">
<div class="puzzle">
<div class="puzzle2">
<div id="homeGenr8"><img src="images/HomeButton_03.png" alt="HomeG8MobAlt" name="homeGenr8" width="100%" id="homeGenr82" ></div>
<div id="Genr8Flash"><img src="images/AnimasjonMotsatt.gif" alt="FlashG8MobAlt" name="Genr8Flash" width="100%" id="Genr8Flash2" ></div>
<div id="puzzleK"><img src="images/puzPlugin_56.png" alt="PluginsG8Alt" name="puzzleK" width="100%" class="AllElements" id="puzzleK2" ></div>
</div>
<ul id="navlist">
<li id="Intro"></li>
<li id="Source"></li>
</ul>
<ul id="navlist2">
<li id="genr82001"></li>
<li id="compDebug"></li>
</ul>
<ul id="navlist3">
<li id="pWorkings"></li>
</ul>
<ul id="navlist4">
<li id="analysis"></li>
</ul>
<ul id="navlist5">
<li id="g8new"></li>
</ul>
</div>
<Script type="text/javascript" src="BodyScriptGenr8.js"></Script>
</body>
</html>
As you can see from the header, I have tried to include a separate stylesheet for IE8 and lower, but there seems to be no difference. I am using IETester with debugbar to test.
I have tried to change everything in the css, but nothing registers. THE MAIN question though remains: Why o why will the sprites not position right with older IE ?
css for the "mobile" or small windowed desktop:
#charset "utf-8";
/* CSS Document */
#media screen and (max-width: 649px), screen and (max-width: 767px) and (min-device-height:320px){
body {
background-color: #000!important;
}
a:link {
text-decoration: #000;
}
a:visited {
text-decoration: #000;
}
a:hover {
text-decoration: #000;
}
a:active {
text-decoration: #000;
}
img {
border:0;
}
.puzzle {
display: block;
position: absolute;
width:290px;
height:282px;
margin-left: -145px;
margin-top: -141px;
/*margin-left: auto;*/
/*left: auto;
top: auto;*/
top: 50%;
left: 50%;
background-image: url(images/puzzleGenr8SpriteFullMob.png);
/*_background-image: url(images/puzzleGenr8SpriteFullMob.gif);*/ /*IE6*/
background-size:290px 282px!important;
background-position: 0px 0px;
z-index: 1;
background-repeat: no-repeat;
}
.puzzle2 {
position: relative;
z-index: 2;
display:block;
background-color: #000!important;
}
#homeGenr8 {
display: block;
position: absolute;
height: 28px;
width: 69px;
left: 0px;
top: 0px;
visibility: visible;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
/*html>body #homeGenr8
{
width: auto;
height: auto;
min-width: 69px;
min-height: 28px;
}
*/
#Genr8Flash {
display: block;
position: absolute;
height: 28px;
width: 62px;
top: 0px;
left: 228px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
#puzzleK {
display: block;
position: absolute;
visibility: visible;
height: 28px;
width: 63px;
left: 227px;
top: 254px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
#navlist{position:relative;}
#navlist li{margin:0;padding:0;list-style:none;position:absolute;top:-8px;}
#navlist li, #navlist a{height:23px;display:block;}
/*#backG{left:0px;width:580px;height:563px;}
#backG{background:url('images/puzzleGenr8SpriteFull.png') 0 0;}*/
#Intro{left:85px;width:50px;height:23px;}
#Intro{background:url('images/puzzleGenr8SpriteFull.png') -83px -5px;background-size: 290px 282px; background-repeat:no-repeat;}
#Intro a:hover{background: url('images/Spritepuz1Mob.gif') -83px -5px;
background-size: 290px 282px; background-repeat:no-repeat;}
#Source{left:152px;width:58px;height:14px;}
#Source{background:url('images/puzzleGenr8SpriteFull.png') -152px -8px;
background-size: 290px 282px; background-repeat:no-repeat;}
#Source a:hover{background: url('images/Spritepuz1Mob.gif') -152px -8px;
background-size: 290px 282px; background-repeat:no-repeat;}
#navlist2{position:relative;}
#navlist2 li{margin:0;padding:0;list-style:none;position:absolute;top:22px;}
#navlist2 li, #navlist2 a{height:28px;display:block;}
#genr82001{left:31px;width:50px;height:27px;}
#genr82001{background:url('images/puzzleGenr8SpriteFull.png') -28px -38px;
background-size: 290px 282px; background-repeat:no-repeat;}
#genr82001 a:hover{background: url('images/Spritepuz1.gif') -28px -38px;
background-size: 290px 282px; background-repeat:no-repeat;}
#compDebug{left:220px;width:60px;height:20px;}
#compDebug{background:url('images/puzzleGenr8SpriteFull.png') -220px -38px;
background-size: 290px 282px; background-repeat:no-repeat;}
#compDebug a:hover{background: url('images/Spritepuz1Mob.gif') -220px -38px;
background-size: 290px 282px; background-repeat:no-repeat;}
#navlist3{position:relative;}
#navlist3 li{margin:0;padding:0;list-style:none;position:absolute;top:63px;}
#navlist3 li, #navlist3 a{height:23px;display:block;}
#pWorkings{left:147px;width:55px;height:23px;}
#pWorkings{background:url('images/puzzleGenr8SpriteFull.png') -147px -75px;
background-size: 290px 282px; background-repeat:no-repeat;}
#pWorkings a:hover{background: url('images/Spritepuz1Mob.gif') -147px -75px;
background-size: 290px 282px; background-repeat:no-repeat;}
#navlist4{position:relative;}
#navlist4 li{margin:0;padding:0;list-style:none;position:absolute;top:105px;}
#navlist4 li, #navlist4 a{height:27px;display:block;}
#analysis{left:25px;width:53px;height:23px;}
#analysis{background:url('images/puzzleGenr8SpriteFull.png') -20px -120px;
background-size: 290px 282px; background-repeat:no-repeat;}
#analysis a:hover{background: url('images/Spritepuz1Mob.gif') -20px -120px;
background-size: 290px 282px; background-repeat:no-repeat;}
#navlist5{position:relative;}
#navlist5 li{margin:0;padding:0;list-style:none;position:absolute;top:221px;}
#navlist5 li, #navlist5 a{height:27px;display:block;}
#g8new{left:12px;width:55px;height:23px;}
#g8new{background:url('images/puzzleGenr8SpriteFull.png') -7px -232px;
background-size: 290px 282px; background-repeat:no-repeat;}
#g8new a:hover{background: url('images/Spritepuz1Mob.gif') -7px -232px;
background-size: 290px 282px; background-repeat:no-repeat;}
}
I get warnings for background-size in the css-file, but how would I go about correcting my css/html for this to display correctly in IE6,7 and 8 ?
Just to be clear - I am not going to change all my html and css just for the page to display with old IE, but I would really appreciate a little insight :-)

#media is not supported by IE8 or earlier. All your CSS code is inside an #media block, and thus won't be seen by these browsers.
You can use a polyfill like respond.js to handle this which will probably help (although I can't vouch for the performance if you need to support browsers as old as IE8).
But to be honest most of that CSS code shouldn't be inside an #media block anyway; media blocks should contain only the styles which you want to be different from normal for a given screen size. Everything that's the same as normal should be kept outside of the media block.
If you just do that, there's a good chance that you may not even need to worry about respond.js if you can get the default CSS outside of the media blocks to be how you want IE6/7/8 to behave; then the media blocks can just be for overrides for browsers in different sized windows to that.
[EDIT]
You've edited the question, and I now see that you're already using respond.js, so hopefully this means that the above is not the main issue. I still think you need to reduce the size of your media query code though; there's a lot of CSS in there which really shouldn't be in a media query.
The other problem you've got is that you're using background-size for your sprite image.
This is another CSS feature that is not supported by IE8 and earlier, and this will definitely break your sprites. In fact it weakens the whole concept of using background images for sprites in IE8.
Again, there are polyfills for this feature, you can you get it working in IE8 if you're determined. See here for links to a few possible options. I usually recommend CSS3Pie for this kind of thing, but as you can see it's not the only option, so pick the one that works best for you.
Always bear in mind that the more polyfill scripts you use, and the more you're asking them to do, the more of a performance impact it'll have.

Related

Simple html not phone responsive, can't figure out why

I have this very simple web that I developed. I used all the codingand tips provided in similar questions here but with no luck. The web runs ok and its validated, but divs do not resize to fit phones. Can anybody give it a quick look and give me some pointers? much appreciated.
Here is the HTML code:
#import url(//db.onlinewebfonts.com/c/03af38e6d90add293d43f1ef74ce755f?family=Adieu+Light);
#font-face {
font-family: "Adieu Light";
src: url("http://db.onlinewebfonts.com/t/03af38e6d90add293d43f1ef74ce755f.eot");
src: url("http://db.onlinewebfonts.com/t/03af38e6d90add293d43f1ef74ce755f.eot?#iefix") format("embedded-opentype"), url("http://db.onlinewebfonts.com/t/03af38e6d90add293d43f1ef74ce755f.woff2") format("woff2"), url("http://db.onlinewebfonts.com/t/03af38e6d90add293d43f1ef74ce755f.woff") format("woff"), url("http://db.onlinewebfonts.com/t/03af38e6d90add293d43f1ef74ce755f.ttf") format("truetype"), url("http://db.onlinewebfonts.com/t/03af38e6d90add293d43f1ef74ce755f.svg#Adieu Light") format("svg");
}
.body, html {
height: 100%;
margin: 0;
background-image: url("Home-bck.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.full {
padding: 0;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%)translateY(-50%)
}
.tromper {
display: flex;
justify-content: center;
margin-top: auto;
margin-bottom: 0px;
color: #686868;
font-family: adieu light;
font-size: 28px;
}
.better {
display: flex;
justify-content: center;
margin-top: -39px;
color: #707070;
font-family: Adieu light;
}
.social ul {
display: flex;
position: absolute;
justify-content: center;
right: 50%;
left: 44%;
list-style: none;
}
.social ul li {
margin-top: 0;
margin-right: 15px;
margin-left: 15px;
margin-bottom: 30px;
}
.social ul li .fa {
font-size: 70px;
line-height: 60px;
color: #626262;
}
.social ul li .fa-instagram:hover {
color: #bfeefd;
transition: .5s;
transform: translate(0, -10px) rotate(360deg);
}
.social ul li .fa-linkedin:hover {
color: #bfeefd;
transition: .5s;
transform: translate(0, -10px) rotate(360deg);
}
.Contact {
display: flex;
justify-content: center;
margin-top: 70px;
margin-right: auto;
margin-left: auto;
margin-bottom: 0;
color: #626262;
font-family: Adieu Light;
font-size: 24px;
}
.clients {
display: flex;
justify-content: center;
}
/* Media Queries: Tablet Landscape */
#media screen and (max-width: 1060px) {
#primary { width:67%; }
#secondary { width:30%; margin-left:3%;}
}
/* Media Queries: Tabled Portrait */
#media screen and (max-width: 768px) {
#primary { width:100%; }
#secondary { width:100%; margin:0; border:none; }
}
img { max-width: 100%; height: auto;
}
#media (min-device-width:600px) {
img[data-src-600px] {
content: attr(data-src-600px, url);
}
}
#media (min-device-width:800px) {
img[data-src-800px] {
content: attr(data-src-800px, url);
}
}
html { font-size:100%; }
#media (min-width: 640px) { body {font-size:1rem;} }
#media (min-width:960px) { body {font-size:1.2rem;} }
#media (min-width:1100px) { body {font-size:1.5rem;} }
<!DOCTYPE html>
<html>
<head>
<style></style>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="HandheldFriendly" content="true">
<meta charset="utf-8">
<title>Tromper&Tromper</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="https://db.onlinewebfonts.com/c/03af38e6d90add293d43f1ef74ce755f?family=Adieu+Light" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="full container">
<div class="tromper">
<h1>TROMPER&TROMPER</h1>
</div>
<div class="better">
<h3>"BETTER TOGETHER"</h3>
</div>
<div class="social">
<ul>
<li>
<a href="https://www.instagram.com/tromperandtromper/?hl=es" target="_blank">
<i class="fa fa-instagram"></i>
</a>
</li>
<li>
<a href="https://www.linkedin.com/company/tromper-and-tromper-works" target="_blank">
<i class="fa fa-linkedin"></i>
</a>
</li>
</ul>
</div>
<a href="mailto:whatever#whatever.com" style="text-decoration:none" target="_blank">
<div class="Contact">
<h4>CONTACT US</h4>
</div>
</a>
<div class="clients"></div>
</div>
</body>
</html>
The reason of your div is not resizable it's because h1 tag.
You can try modify your css file with this:
/* Media Queries: Tabled Portrait */
#media screen and (max-width: 768px) {
#primary { width:100%; }
#secondary { width:100%; margin:0; border:none; }
h1 {font-size: 7vw;} /* <- HERE */
}
However, your code isn't semantic. Try to improve this with the time.
I would comment as I am not sure if this is the right answer, but unfortunetly I am not allowed to.
I don't want to offend you or your experience level but it seems like you do not know how css works? Or maybe you just copied without looking.
You use the media queries to make the website responsive pretty much. Depending on your needs of course.
The easiest way to make divs respeonsive is giving them a width with %. So if you give them lets say 90% they will only get 900px wide when the screen (or window) is 1000px etc.
When you use media queries, because maybe the divs need to be smaller or bigger or you use absolute numbers (like pixel or so) you also need to use your classes and IDs.
Right now in your media queries I see two IDs "primary" and "secondary" because with # you declare this is an ID and in your HTML I dont see any IDs at all. So how is the browser supposed to know, where to apply your CSS?
Now, I dont claim to be a professional CSS user, so it is possible that "#primary" is some sort of special command, but as of right now, I would say there is at least one of your problems.
You also use alot of flex and I dont really know why? You could also work a bit on your HTML, using containers, sections, articles and such, but thats another story.
i agree with bibleblade, and i would like to add that its pretty weird that you use "screen" and sometimes just dont add it. maybe try to be a bit more consistent with that. and plus, by adding "screen" youre stating that this will only look like this, if its on a screen, so it wont work on a printer, which is pretty unnecessary, so i would just remove the "screen" so it defaults to "all" and the last media queries at the bottom for the font-size. are unnecessary, since you could just make the font-size relative to the screen via vw or vh or just use something like clamp

Parallax image zooming in no matter what I do

it would seem this question has been asked many times over different websites with no real "ah-ha!" answer. I'm still very new and I understand there's a million different ways to code this but I'm hoping for a very simple solution that won't require me to rewrite my code.
It's my understanding this is the inherent nature of parallax, people either have had to crop the images to make them work or have had to do very large workarounds to solve the issue that parallax inherently zooms in or messes with the dimension of the original picture, no matter the orientation on the page (in my case, I'd like to keep it on the left side of the screen, with the text on the right being the scrolling element, haven't gotten around to it but having the nav bar on the top right-half of the page is my next project).
The dimensions of the picture are 1341x2063; I've heard to people setting max-height 2063px; min-height 1341px;. Tried that, didn't work.
I threw up an imgur link for the actual picture I'm working with inside my code, here's a screenshot of what it's looking like on my end: https://imgur.com/lVrQgrQ
My html has my parallax's css inline and I'd like to keep it that way as it's easy for me to understand without having to rework a ton of items.
#charset "UTF-8";
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
/* Change the link color to #111 (black) on hover */
li a:hover {
background-color: #111;
}
.active {
background-color: #4CAF50;
}
button {
transition-duration: 0.4s;
background-color: #800080; /* Purple */
border: none;
color: white;
padding: 6px 38px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 8px;
}
button:hover{
background-color: #4CAF50; /* Green */
color: white;
}
/* Centered text */
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
<!DOCTYPE html>
<html>
<head>
<link href="style.css" rel="stylesheet">
<!-- Adding "active" class/tag to index, for navbar -->
<link href="index.html" class=active>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="description" content="Learn about Tom Waters, English tutoring services in Seoul, resume and more.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Me | Home</title>
<!-- GOOGLE FONTS
<link href="https://fonts.googleapis.com/css2?family=Amatic+SC&display=swap" rel="stylesheet">
-->
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1671.6">
<style>
.parallax {
/* Image to be used */
background-image: url("https://imgur.com/a/FHtZqm7");
min-height: 600px;
/*scrolling effect*/
background-attachment: fixed;
background-position: left;
/*troubleshooting image width */
width: 50%;
height: 100%;
background-repeat: no-repeat;
background-size: auto;
}
/* Turn off parallax scrolling for tablets and phones. Increase the pixels if needed
#media only screen and (max-device-width: 1366px) {
.parallax {
background-attachment: scroll;
}
}
*/
</style>
</head>
<body>
<div class="parallax"></div>
<div style="height:400px;background-color:lightgray;font-size:28px">
<center>
<nav>
<ul id="mainMenu">
<li>About Me</li>
<li>Tutoring Services</li>
<li>Resume</li>
<li>Photography Portfolio</li>
<li>Contact</li>
<li style="float:right"><a class="active" href="index.html">Home</a></li>
</ul>
</nav>
</center>
<br><br><br>
<p><center>
This is me,
<br><br>and this is a personal and professional website, designed solely by myself (as a personal project) with the aim of displaying my resume, contact information and other items in an accessible manner for interested parties to see.
</center></p>
</div>
</body>
</html>
When the background-attachment is set to fixed, it gets fixed relative to the viewport. This is to achieve the parallax effect. The browser does this while keeping the aspect ratio. So to prevent the looks of a stretched or zoomed image you can just crop your image or play around with the background-size css value.
.parallax {
background-size: 100% 65%;
}
The only setting you have to change is the second value, this will help you fix the stretchy or zoomed effect on the image, an other suggestion you might check is set background-size to cover.
Just to add, adding background-size: 'auto auto' worked for me. Having it set to 'cover' was causing a huge zoom effect. This fixed it.

How do I get this website to render correctly in Internet Explorer 8 and below?

I created a website last night that works in Chrome, Firefox, Safari and Opera, but it isn't working in Internet Explorer
I tried creating conditional styling and html5.shiv in the head tags. My code looks like this:
<!DOCTYPE html>
<html>
<head>
<title>Flat Design</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/style.css">
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,900' rel='stylesheet' type='text/css'>
<link href="css/hover.css" rel="stylesheet" media="all">
<!--[if lt IE 9]>
<script src="dist/html5shiv.js" type="text/javascript"></script>
<script src="PIE.js" type="text/javascript"></script>
<style type="text/css">
.wrap {
width: 980px;
}
.logo {
float: left;
}
.main-nav {
float: right;
}
.main {
width: 40.425531914894%;
height: 900px;
margin: 0;
}
.secondary {
width: 36.170212765957%;
height: 900px;
margin-left: 15px;
}
.extra {
display: block;
width: 23.404255319149%;
height: 900px;
}
</style>
<![endif]-->
</head>
<body>
<div class="wrap">
<header class="main-header">
<a class="logo" href="#"><h2>My Experience in Web Development</h2> </a>
<nav class="main-nav">
<a link href="#" class="hover">Home</a>
<a link href="#" class="hover">About</a>
<a link href="#" class="hover">Clients</a>
<a link href="#" class="hover">News</a>
<a link href="#" class="hover">Contact</a>
</nav>
</header>
<div class="content">
<div class="main col">
<h3>My candid experience in trying to find a job as a Web Developer</h3>
<p>It hasn't been a dull moment ever since I decided to switch careers to web development.</p>
<p>I've taken up the arduous task of putting together a portfolio of several pieces of my best work. At the same time, I brushed up on my skillset by taking online courses at Team Treehouse and several YouTube tutorials, as well as utilized sites such as Stack Overflow, SitePoint, Six Revisions, etc.</p>
</div>
<div class="secondary col">
<h3>Hitting the pavement for a job in web development.</h3>
<p>In December of 2012, I decided to put my resume online to see what the job market was like in web development.</p>
<p>A month later,I landed an assignment at Web 4 Purpose as a jr. front end web developer.I handled all of the CSS,HTML,Javascript coding from wireframes done in Adobe Photoshop or drawn.<br></p>
</div>
<div class="extra col">
<h3>There's several web technologies.</h3>
<p>Here's a short list of the several web technologies out there:</p>
<ol>
<li>HTML5</li>
<li>CSS3</li>
<li>Javascript</li>
<li>JQuery</li>
<li>Bootstrap </li>
<li>Foundation</li>
<li>Angular.js </li>
</ol>
<br>
</div>
</div>
<footer class="main-footer">
<img src="img/twitter.png" alt="Twitter" class="social-icon">
<img src="img/facebook.png" alt="Facebook" class="social-icon">
<img src="img/linkedin.png" alt="LinkedIn" class="social-icon">
<img src="img/youtube.png" alt="YouTube" class="social-icon">
<img src="img/googleplus.png" alt="Google Plus" class="social-icon">
<p>© 2014 michaellegemah.com</p>
</footer>
</div>
</body>
</html>
The CSS sheet is this:
* {
box-sizing: border-box;
}
body {
margin: 0;
padding-top: 25px;
background: #ECF0F1;
color: #FFF;
font: 1.3em/1.6 sans-serif;
}
.wrap {
margin: auto;
width: 90%;
}
.main-header {
background: #2C3E50;
text-align: center;
font-family: 'Lato', sans-serif;
font-weight: 900;
}
.logo,
.main-nav a {
display: inline-block;
color: #FFF;
text-decoration: none;
font-family: 'Lato', sans-serif;
font-weight: 900;
}
.main-nav a {
padding: 0 .75em;
border-right: 1px dotted;
color: #FFF;
font-size: .7em;
line-height: 1rem;
}
.main-nav a:hover {
text-decoration: underline;
}
.main-nav a:last-child {
border-right: none;
}
.content,
.main-header {
overflow: hidden;
}
.col {
height: auto;
}
.main {
background: #3498DB;
font-family: 'Lato', sans-serif;
}
h3 {
font-weight: 900;
}
li a, a {
text-decoration: none;
color: #FFF;
font-weight: 900;
}
.secondary {
background: #2ECC71;
font-family: 'Lato', sans-serif;
}
.extra {
display: none;
background: #C0392B;
font-family: 'Lato', sans-serif;
}
.main-footer {
background: #95A5A6;
font-family: 'Lato', sans-serif;
}
.social-icon {
width: 40px;
height: 40px;
margin: 0 5px;
border: none;
}
.main-header,
.main-footer,
.col {
margin-bottom: 15px;
padding: 2.15%;
border-radius: 5px;
}
/* ==========================================================================
Media Queries
========================================================================== */
/* Phones to Tablets */
#media only screen and (min-width: 481px) {
.col {
float: left;
}
.main {
width: 65.957446808511%;
height: 900px;
}
.secondary {
width: 31.914893617021%;
height: 900px;
}
.secondary,
.extra {
margin-left: 2.127659574468%;
}
}
/* Tablets to Desktop */
#media only screen and (min-width: 769px) {
.logo {
float: left;
}
.main-nav {
float: right;
}
.main {
width: 40.425531914894%;
height: 900px;
}
.secondary {
height: 900px;
}
.extra {
display: block;
width: 23.404255319149%;
height: 900px;
}
}
#media only screen and (min-width: 1024px) {
.wrap {
width: 980px;
}
}
Unfortunately, the result has been this: http://flatdesign.originexample.site90.com which looks fine in all browsers except IE
If anyone sees anything I might have overlooked, or if there's a better solution, please let me know thanks
Using the IE11 developer-tools emulator to mimick IE8, I'm seeing two main differences:
no rounded corners;
columns aren't floating side-by-side;
The border radius can't be fixed easily and doesn't really affect performance, so I hope you're okay with ignoring that.
The column floats are what's making it look really ugly, and thankfully that's easy to fix.
You're creating your columns with the following rule:
#media only screen and (min-width: 481px){
.col {
float: left;
}
}
The problem is the "only" keyword. That keyword is designed to prevent browsers that don't recognize media queries from applying that style. That includes IE8. It reads it as a media query for a media type named "only"; it doesn't recognize that type, so it doesn't apply the style. If you remove the keyword:
#media screen and (min-width: 481px){
.col {
float: left;
}
}
Then IE8 reads that as #media screen blah,blah,blah. It ignores the stuff it doesn't understand and applies the rule to all screens regardless of their width.
For IE8, that's probably okay, since nobody's using IE8 on a handheld device. And if their screen is too narrow, that's okay since it just means the floated elements will end up one after another, the way they are without the floats.
It's possible that the change will also affect some older handheld devices that don't recognize min-width type media queries, but again, floats are pretty flexible.
One more thing: even when I added in a float property to your columns, the third column wasn't fitting in a row with the others. Two possible culprits: either IE8 is automatically adding in padding or margins somewhere you're not expecting, or they are rounding lengths up to the next pixel and that's throwing off your addition. A little bit of playing around with those settings should get them all side-by-side. If you make your last column float right instead of left, you can get away with making the margins slightly smaller without ruining the rectangular lines of the design.

HTML / CSS breaks div when zooming out

I am designing a website for my father and so far I'm midway the index page only.
What is bugging me that when I zoom out to around 30% (just for tests sake) The divs are broken and they end up out of place (will show you an example). Also even the divs do not stay as one "whole entity"
I tried basically everything, the min-width (which is 965px). Is there a way to make it round up Percentage wise sort of? If so, how can it be made considering that the width max-width has to be 965px?
My website is mainly for PCs.
Also I am using HTML5 and CSS3
There is one outer div which puts the whole body into a "box"
Warning: My header is in a PHP so is the footer and then I just load them. I will be posting both the header.php and the generalbackground CSS
The CSS Code is this:
#charset "utf-8";
/* CSS Document */
body
{
background:url(pics/bg.jpg) no-repeat center center fixed;
background-color:#282828;
font-family: 'Sancreek', cursive;
min-width:965px;
margin: 0 auto;
}
.bodyoutline
{
min-width:100% ;
}
div.upperbody
{
background:url('pics/topbg.png') no-repeat center center;
width:965px;
height:100px;
margin: 0 auto;
}
div.body
{
background:url('pics/divbg.png') no-repeat center center fixed;
width:965px;
height:1304px;
margin: 0 auto;
margin-top:-25px;
}
div.header
{
background:url('pics/header.png');
width:965px;
margin: 0 auto;
height: 319px;
overflow:hidden;
}
div.logo
{
background:url('pics/logo.png');
width: 220px;
height: 215px;
float:left;
margin-left:20px;
margin-top:20px;
}
div.groupPhoto
{
background:url('pics/group.png');
float:right;
margin-right:30px;
width:552px;
height:244px;
margin-top:30px;
transform: rotate(12deg);
-ms-transform: rotate(12deg); /* IE 9 */
-webkit-transform: rotate(12deg); /* Safari and Chrome */
}
div.mainContent
{
width:965px;
margin: 0 auto;
float:left;
}
div.menuLinks
{
width:965px;
margin: 0 auto;
text-align:center;
}
ul,li.menuLinks
{
width:965px;
margin: 0 auto;
display:inline;
font-size: 38px;
padding: 10px;
color: #39100a;
font-weight:bold;
}
div.separator
{
width:965px;
text-align:center;
margin:0 auto;
height:50px;
}
div.box
{
width:965px;
margin: 0 auto;
}
div.updec
{
background:url('pics/updec.png') center no-repeat;
width: 965px;
height: 202px;
}
h1.titles
{
margin-left:75px;
font-size:30px;
}
h1.ePhotos
{
float:left;
font-size:18px;
text-decoration:underline;
margin-left:25px;
}
.position
{
margin-left:90px;
margin-top:-130px;
}
a:visited
{
text-decoration:none;
color:#000;
}
a:hover
{
text-outline:#000;
outline-color:#000;
outline-width:2px;
margin: 0 auto;
}
header.php
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Copyright" content="© Dorienne Grech (DodoSerebro), All Rights Reserved ">
<meta name="description" content ="Forever Friends Official Website. All the Latest Dances Walkthroughs, Videos of Recent Events, Photos, Contacts and More regarding Forever Friends Linedancers will be found here!, latest Dances">
<meta name="keywords" content="">
<title>Forever Friends Lineadancers Official Site</title>
<link rel="stylesheet" type="text/css" href="generalbackground.css">
<link rel="stylesheet" type="text/css" href="accordion.css">
<link href='http://fonts.googleapis.com/css?family=Sancreek' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="bodyoutline">
<div class="upperbody"></div>
<div class="body">
<div class="header"> <!-- Header containing Logo and Group Photo -->
<div class="logo"></div> <!-- Logo -->
<div class="groupPhoto"></div> <!-- end of groupPhoto -->
</div> <!--End of header -->
<div class="mainContent"> <!--Main Body Consisting of Links / Video/Photo and others -->
<div class="menuLinks"> <!-- Menu Links -->
<ul class="menuLinks">
<li class="menuLinks">Home</li>
<li class="menuLinks">About</li>
<li class="menuLinks">Dances</li>
<li class="menuLinks"> Videos </li>
<li class="menuLinks">Events </li>
<li class="menuLinks">Contact</li>
</ul>
</div> <!-- end of mainContent -->
Result of Zooming out to 30%
http://imageshack.us/photo/my-images/571/y1bw.jpg/
PS: BROWSER Currently Testing and using is GOOGLE CHROME: Version 29.0.1547.66 m
thanks
best practice would be
.bodyoutline
{
position: relative;
min-width: 1366px;
max-width: 2048px;
margin: 0px auto;
width: 100%;
}
This will make your all elements be in the div and always aligned regardless of zoom-in or zoom-out.
What I found best people is to use the MEDIA QUERIES
By Simply adding
#media (max-width: 600px)
{
//All the CSS [classes] to be effected by the change in screen will be written here for e.g
h1
{
font-size:20px;
}
}
When the screen is 600px or smaller (or zoomed out) the font-size of h1 will change to 20px whereas ALL the other CSS will stay as originally written (as it is the parent)
In other words:
Media queries will ONLY affect those classes written between the media queries (will overwrite the original)

How to make my SVG map render correctly in the browser?

I want a dynamic webpage that looks nearly identical to this one that is for sale:
So I bought and implemented the US state map but it's becoming too small on my webpage:
I want the map to be larger. How can it be done? The entire code is large so I've taken out the relevant part that displays the map and I've taken out all the SVG data from this code block
<html dir="ltr" lang="en-IN" class="js"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="keywords" content="Houses Apartments, Vacation homes, Offices, Land, Flatmates,Paying Guest, Other real estate, Cars, Motorcycles, Accessories parts, Trucks, Other vehicles, Home Garden, Clothing, For Kids (Toys Clothes), Jewelry Watches, Hobbies, Sports Bicycles, Movies, Books Magazines, Pets, Tickets, Art Collectibles, Music Instruments, Computers Accessories, TV, Audio, Video, Cameras, Cellphones gadgets, Video games consoles, Job offers, Resumes, Services, Classes, Professional,Office equipment, Other, ">
<meta name="description" content="Find jobs, cars, houses, mobile phones and properties for sale in your region conveniently. Find the best deal among {{count}} free ads online!">
<title>Free classifieds in India - HipHeap.com</title>
<!-- CSS INCLUDES: -->
<link href="/static/india_files/index_in.css?234" rel="stylesheet" type="text/css">
<!--[if lt IE 9.]>
<script type="text/javascript" src="http://content.hipheap.com/js/3e233f78542ce91af211f0d166/html5shiv.js"></script>
<![endif]-->
<link rel="icon" href="/img/favicon_in.ico?07217" type="image/x-icon">
<link rel="shortcut icon" href="/img/favicon_in.ico?07217" type="image/x-icon">
<link rel="icon" href="/img/favicon_in.png?07217" type="image/png">
<link rel="shortcut icon" href="/img/favicon_in.png?07217" type="image/png">
<link rel="apple-touch-icon" href="/img/favicon_ios_in.png?07217" type="image/png">
<link rel="prerender" href="/">
<link rel="prefetch" href="/">
<!-- JAVASCRIPTS: -->
</script><script type="text/javascript" src="/static/1_files/jquery-1.js"></script> <link href="/static/css/index_usa.css?978923487" rel="stylesheet" type="text/css">
<link rel="icon" href="/img/favicon_us.ico?51340" type="image/x-icon">
<link href="/static/1_files/common_us.css?9823476" rel="stylesheet" type="text/css"> <link rel="stylesheet" type="text/css" href="/static/theCss.css" />
<script src="/static/jquery.min.js" type="text/javascript"></script>
<script src="/static/us2Config.js" type="text/javascript"></script>
<script src="/static/theJava.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
addEvent('map_1');
addEvent('map_2');
addEvent('map_3');
addEvent('map_4');
addEvent('map_5');
addEvent('map_6');
addEvent('map_7');
addEvent('map_8');
addEvent('map_9');
addEvent('map_10');
addEvent('map_11');
addEvent('map_12');
addEvent('map_13');
addEvent('map_14');
addEvent('map_15');
addEvent('map_16');
addEvent('map_17');
addEvent('map_18');
addEvent('map_19');
addEvent('map_20');
addEvent('map_21');
addEvent('map_22');
addEvent('map_23');
addEvent('map_24');
addEvent('map_25');
addEvent('map_26');
addEvent('map_27');
addEvent('map_28');
addEvent('map_29');
addEvent('map_30');
addEvent('map_31');
addEvent('map_32');
addEvent('map_33');
addEvent('map_34');
addEvent('map_35');
addEvent('map_36');
addEvent('map_37');
addEvent('map_38');
addEvent('map_39');
addEvent('map_40');
addEvent('map_41');
addEvent('map_42');
addEvent('map_43');
addEvent('map_44');
addEvent('map_45');
addEvent('map_46');
addEvent('map_47');
addEvent('map_48');
addEvent('map_49');
addEvent('map_50');
addEvent('map_51');
})
</script>
<style>
.unselectable {
-moz-user-select:none;
-webkit-user-select:none;
}
</style>
<style>
p.pos_fixed
{
position:fixed;
left:15px;
}
</style>
</head>
<!--[if IE 6 ]> <body name="body" class=" ie ie6 not-ie7 not-ie8 not-ie9 "> <![endif]-->
<!--[if IE 7 ]> <body name="body" class=" ie ie7 not-ie6 not-ie8 not-ie9 "> <![endif]-->
<!--[if IE 8 ]> <body name="body" class=" ie ie8 not-ie6 not-ie7 not-ie9 "> <![endif]-->
<!--[if IE 9 ]> <body name="body" class=" ie ie9 not-ie6 not-ie7 not-ie8 "> <![endif]-->
<!--[if !IE]>--><body name="body" class=" not-ie6 not-ie7 not-ie8 not-ie9 not-ie"><!--<![endif]-->
<div class="topbar">
<div class="topbar-inner nohistory">
<div class="topbar-left">
<a class="topbar-new" href="https://www.hipheap.com/account/create"><strong>New!</strong> All your ads and saved searches in one place, create an account today!</a>
</div>
<div class="topbar-right">
<a class="topbar-login last" href="https://www.hipheap.com/account/login" title="Login to your account" rel="nofollow">
<i class="sprite_common_topbar_log-in topbar-float_left"></i>
Log in
</a>
<a class="topbar-create first" href="https://www.hipheap.com/account/create" title="Create your account" rel="nofollow">
<i class="sprite_common_topbar_logged-in topbar-float_left"></i>
Create account
</a>
</div>
</div>
</div>
<div id="wrapper">
<!--[if lt IE 7]>
<div class="alert-outer alert-error">
×
<div class="alert-inner">
<span><strong>You are using an outdated version of Internet Explorer.</strong> For a faster, safer browsing experience, upgrade today!</span>
</div>
</div>
<![endif]-->
<header>
<h1 id="logo" class="sprite_index_in_in_en_logo spritetext">hipheap.com - The right choice for buying & selling in india</h1>
<div id="post">
Post your ad for free
</div>
</header>
<div class="main">
<div class="column_left">
<div class="box">
<h2>High quality classifieds near you</h2>
<ul><li>HipHeap is safe, easy, and free.</li>
<li>Buy and sell cars, check our real estate section, find jobs, and much more.</li>
<li>Check our <strong>{{count}} ads online</strong> and find what you are looking for in your region or in all India.</li></ul>
</div>
<div id="regions">
<div class="region_links_one">
<ul class="regions_one">
<li><a id="region_8" class="region" href="/q?query=regionID%3D4694186">Alabama</a></li>
<li><a id="region_9" class="region" href="/q?query=regionID%3D4699188">Alaska</a></li>
<li><a id="region_10" class="region" href="/q?query=regionID%3D4692186">California</a></li>
</ul>
<ul class="regions_two">
<li><a id="region_22" class="region" href="/q?query=regionID%3D4694184">Kentucky</a></li>
</ul>
</div>
<div class="region_links_two">
<h2>Union territories</h2>
<ul class="regions_one">
<li><a class="region" href="/q?query=regionID%3D4699183">Delhi</a></li><li><a class="region" href="/q?query=regionID%3D4700189">Lakshadweep</a></li><li><a class="region" href="/q?query=regionID%3D4704183">Daman & Diu</a></li><li><a class="region" href="/q?query=regionID%3D4691190">Dadra & Nagar Haveli</a></li>
</ul>
<ul class="regions_two">
<li><a class="region" href="/q?query=regionID%3D4704183">Chandigarh</a></li><li><a class="region" href="/q?query=regionID%3D4676189">Pondicherry</a></li><li><a class="region" href="/q?query=regionID%3D4703187">Andaman & Nicobar Islands</a></li>
</ul>
</div>
</div>
</div>
<div id="mapcontainer">
<!-- map code -->
<div id="map_base">
<span class="tip" id="tip"></span>
<div onselectstart="return false;" class="unselectable" >
<!-- the svg code starts here -->
</div>
</div>
<div id="likebtn">
<iframe class="fb_iframe" tabindex="-1" scrolling="no" frameborder="0" allowtransparency="true" src="./static/india_files/like.html"></iframe>
</div>
<div class="google_plus">
<!--[if gt IE 7]>
<div id="google_plus1btn"><g:plusone size="medium" href="https://www.hipheap.com"></g:plusone></div>
<script type="text/javascript">
window.___gcfg = {lang: ''};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<![endif]-->
<!--[if !IE]><!-->
<div id="google_plus1btn"><div id="___plusone_0" style="text-indent: 0px; margin: 0px; padding: 0px; background-color: transparent; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 90px; height: 20px; background-position: initial initial; background-repeat: initial initial;"><iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="position: static; top: 0px; width: 90px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 20px;" tabindex="0" vspace="0" width="100%" id="I0_137051343457799865" name="I0_13703434517799865" src="./static/india_files/fastbutton.html" allowtransparency="true" data-gapiattached="true" title="+1"></iframe></div></div>
<script type="text/javascript">
window.___gcfg = {lang: ''};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<!--<![endif]-->
</div>
</div><footer class="nohistory columns">
<div class="widecolumn">
<p class="first">A good deal is just around the corner!</p>
<p>HipHeap is the right choice for safe buying and selling in India: a free classifieds website where you can buy and sell almost everything.</p>
<p>Post an ad for free or browse through our categories. You will find thousands of free classifieds for cars, houses, mobile phones and gadgets, computers, pets and dozens of items and services in your state or union territory.</p>
<p class="last"><strong>HipHeap does not charge any fee and does not require registration.</strong> Every ad is checked so we can give you the highest quality possible for the ads on our site. That’s why HipHeap is the most convenient, easiest to use and most complete free ads site in India.</p>
</div>
<aside>
<nav class="navbar ">
<a class="first" href="/customer_service.htm">
<i class="sprite_common_customer_service"></i>
<span>Customer Service</span>
</a><!--
<a href="/security/index.htm">
<i class="sprite_common_security"></i>
<span>Shop safely</span>
</a>
<a href="/rules.htm">
<i class="sprite_common_rules"></i>
<span>Rules</span>
</a>
<a href="/about.htm">
<i class="sprite_common_about_footer_in"></i>
<span>About HipHeap.com</span>
</a>
<a href="/copyright.htm">
<i>©</i>
<span>Kool Ventures</span>
</a>-->
<a href="https://www.facebook.com/hipheap" target="_blank">
<i class="sprite_common_facebook"></i>
<span>Follow us on Facebook</span>
</a>
</nav>
</aside>
<div id="world_sites">
<p>
Travelling abroad? Visit our classifieds sites in other countries. See:<br>
Montao,
</p>
</div>
</footer>
<div id="scripts">
<!-- NO SCRIPTS -->
</div>
</div><!-- / #wrapper -->
</body></html>
I'm a newbie with SVG and the code is large and I acquired it so I'm not very familiar with what's implemented in the page, it's just supposed to be a selection of states on an HTML 5 map, so we got this SVG map that suits of requirements except that it's rendering too small. Can you give me a hint where I should change to make the efault rendering of the map larger? Is it the CSS or the HTML? The CSS that I acquired from the map's manuifacturer is:
/* reset */
form {display:block; margin:0; padding:0;} body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements structure element */dl, dt, dd, ul, ol, li, /* list elements list element */pre, /* text formatting elements text format element */fieldset, lengend, button, input, textarea, /* form elements */th, td { /* table elements */ margin: 0; padding: 0;} table th,table td {padding:1px} /* */body,button, input, select, textarea { /* for ie */ /*font: 12px/1 Tahoma, Helvetica, Arial, sans-serif;*/ font: 12px/1 arial,verdana,tahoma,sans-serif; /* */}h1 { font-size: 18px; /* 18px / 12px = 1.5 */ }h2 { font-size: 16px; }h3 { font-size: 14px; }h4, h5, h6 { font-size: 100%; }address, cite, dfn, em, var { font-style: normal; } /* */code, kbd, pre, samp, tt { font-family: "Courier New", Courier, monospace; } /* */small { font-size: 12px; } /* *//* */ul, ol { list-style: none; }/* */a { text-decoration: none; color:#049;}a:hover { text-decoration: underline; }abbr[title], acronym[title] { /* :1.ie6 abbr; 2.,ie6 */ border-bottom: 1px dotted; cursor: help;}q:before, q:after { content: ''; }/* */legend { color: #000; } /* for ie6 */fieldset, img { border: none; } /* img *//* :optgroup */button, input, select, textarea { font-size: 100%; /* */}/* */table { border-collapse: collapse; border-spacing: 0;}/* hr */hr { border: none; height: 1px;} .clear{ clear:both;}
a:hover{text-decoration: none;}
#wrapper
{
max-width:1920px;
margin:0 auto;
padding:0px 0;
background-color:#f8edcd;
min-width:220px;
}
#media screen and (max-width: 240px)
{
svg
{
height:150px;
width:98%;
margin:0px;
}
#msg_box
{
position: relative;
width:98%;
margin:0px;
}
#msg_title
{
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
height:150px;
padding:2%;
}
}
#media screen and (max-width: 320px) and (min-width: 241px)
{
svg
{
height:204px;
width:98%;
margin:0px;
}
#msg_box
{
position: relative;
width:98%;
margin:0px;
}
#msg_title
{
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
height:170px;
padding:2%;
}
}
#media screen and (max-width: 400px) and (min-width: 321px)
{
svg
{
height:256px;
width:98%;
margin:0px;
}
#msg_box
{
position: relative;
width:98%;
margin:0px;
}
#msg_title
{
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
height:168px;
padding:2%;
}
}
#media screen and (max-width: 480px) and (min-width: 401px)
{
svg
{
height:310px;
width:98%;
margin:0px;
}
#msg_box
{
position: relative;
width:98%;
margin:0px;
}
#msg_title
{
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
height:190px;
padding:2%;
}
}
#media screen and (max-width: 568px) and (min-width: 481px)
{
svg
{
height:370px;
width:98%;
margin:0px;
}
#msg_box
{
position: relative;
width:98%;
margin:0px;
}
#msg_title
{
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
height:190px;
padding:2%;
}
}
#media screen and (max-width: 685px) and (min-width: 569px)
{
svg
{
height: 280px;
float:left;
width:64%;
}
#msg_box
{
float:left;
position: relative;
width:36%;
}
#msg_title
{
width:80%;
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
width:90%;
height:210px;
padding:2%;
}
}
#media screen and (max-width: 768px) and (min-width: 686px)
{
svg
{
height: 320px;
float:left;
width:64%;
}
#msg_box
{
float:left;
position: relative;
width:36%;
}
#msg_title
{
width:80%;
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
width:90%;
height:240px;
padding:2%;
}
}
#media screen and (max-width: 1024px) and (min-width: 769px)
{
svg
{
height: 424px;
float:left;
width:64%;
}
#msg_box
{
float:left;
position: relative;
width:36%;
}
#msg_title
{
width:80%;
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
width:90%;
height:318px;
padding:2%;
}
}
#media screen and (max-width: 1280px) and (min-width: 1025px)
{
svg
{
height: 530px;
float:left;
width:64%;
}
#msg_box
{
float:left;
position: relative;
width:36%;
}
#msg_title
{
width:80%;
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
width:90%;
height:400px;
padding:2%;
}
}
#media screen and (max-width: 1600px) and (min-width: 1281px)
{
svg
{
height: 674px;
float:left;
width:64%;
}
#msg_box
{
float:left;
position: relative;
width:36%;
}
#msg_title
{
width:80%;
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
width:90%;
height:506px;
padding:2%;
}
}
#media screen and (min-width: 1601px)
{
svg
{
height: 842px;
float:left;
width:64%;
}
#msg_box
{
float:left;
position: relative;
width:36%;
}
#msg_title
{
width:80%;
margin:0 auto;
min-height:25px;
}
#msg_data
{
margin:15px auto 5px;
width:90%;
height:632px;
padding:2%;
}
}
.tip{
display:none;
padding:5px;
border:1px solid #EBECED;
color:#edeef0;
font-weight: bold
;z-index:1000;
float:left;
position:absolute;
/*gradient color*/
background:#000;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#494949', endColorstr='#656565'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#494949', endColorstr='#656565')"; /* IE8 */
background: -moz-linear-gradient(top, #494949,#656565); /* Firefox */
background: -webkit-gradient(linear, 0 0, 0 100%, from(#494949), to(#656565));
word-break:keep-all;
white-space:nowrap;
}
#msg_title {
border:1px solid #999;
font-weight:bold;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius:8px;
box-shadow:1px 2px 4px #999;
-moz-box-shadow:1px 2px 4px #999;
-webkit-box-shadow:1px 2px 4px #999;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
font-size:21px;
text-align: center;
padding:10px;
line-height: 25px;
color:#333;
/*gradient color*/
background:#000;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dddddd'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dddddd')"; /* IE8 */
background: -moz-linear-gradient(top, #ffffff,#dddddd); /* Firefox */
background: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#dddddd));
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
}
#msg_data{
line-height: 26px;
background:#e5e5e5;
border:1px solid #999;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius:6px;
box-shadow:1px 2px 8px #999;
-moz-box-shadow:1px 2px 8px #999;
-webkit-box-shadow:1px 2px 8px #999;
overflow: auto;
word-wrap:break-word;
font-size:18px;
text-align: left;
color:#333;
/*gradient color*/
background:#000;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dddddd'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dddddd')"; /* IE8 */
background: -moz-linear-gradient(top, #ffffff,#dddddd); /* Firefox */
background: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#dddddd));
body {background-color:#b0c4de;}
}
n Internet Explorer, the map is large is my page is nearly correct except that the map is not to the left, it is below the state listings:
Update
Fiddle with selfcontained example of problem, I believe what is happening is that my CSS is shadowing itself.
Update 2
I've managed to take it from scratch and resize the map but I don't fuly understand why doubling the last two parameters of the viewBoxattribute actually makes the map smaller. What I'm getting now is starting to look acceptable:
In general, you want to set the viewBox="…" attribute for your SVG to bound your content, and then scale the SVG element as you wish.
Demos
http://jsfiddle.net/Jq3gy/5/
http://jsfiddle.net/Jq3gy/2/
Note that I have a copyright-free optimized US SVG map available: http://phrogz.net/SVG/USMap.svg
Your CSS is setting the height to 674px (on my screen at least) and width to 64% of it's parent container (#mapcontainer). This turns out to be a tall and narrow shape. The browser is scaling the map to fit in that narrow container, which is what is making it look tiny (on Chrome at least).
Try the following:
Work out why #mapcontainer is not using all the available space.
Ensure #mapcontainer has a similar aspect ratio to the SVG viewBox (540:360).
Don't try to change the width and height of the SVG, just leave it at 100% and let it fill its container.
It's possible you might have more luck embedding the SVG using an <object> element. Rather than using inline SVG. If all else fails, try that.