Hi.
My picture .slogandiv won’t center when using margin-left:auto; margin-right:auto.
HTML:
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AirWipp</title>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<link href="css/nivoslider/nivostyles.css" rel="stylesheet" type="text/css">
<script src="css/nivoslider/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="css/nivoslider/jquery.nivo.slider.js" type="text/javascript"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
</head>
<body>
<div id="bgwrapper">
<div id="wrapper">
<div id="slogandiv">
<img class="sloganpic" src="images/Slogan.png" width="901" height="96">
</div>
<div id="sliderdiv">
<div id="slider">
<img src="images/Nivoslider/Banner1.png" title="" />
</div>
<div id="downslogan"></div>
<div id="meny">
</div>
</div>
</div>
</div>
</body>
</html>
CSS:
/* OTHER */
body {background-image:url(../images/BG.jpg); }
/* DIVS */
#wrapper {width:950px; height:2000px; margin-left:auto; margin-right:auto; padding-top:1px; }
#bgwrapper {width:1300px; margin: 0 auto 0 auto; background-image:url(../images/WrapperBG.png) }
#slogandiv {margin-top:20px; width:950px; }
#sliderdiv {width:950px; height:330px; margin-top:10px; }
#meny {width:950px; height:70px; background-color:#F3F; margin-top:20px; }
#downslogan {height:10px; width:950px; background-image:url(../images/Downslogan.png); margin-top:20px;}
/* PICS */
.sloganpic {
margin-right: auto;
margin-left: auto;
}
/* Eric Meyer Reset */
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, em, 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;
}
/* HTML5 display-role reset for older browsers */
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;
}
What’s the problem?
Thanks
//Kevin