For some reason, I am experiencing an issue with centering divs on mobile browsers. It works perfectly fine on normal PC browsers - no issues at all =D. However, the main content on mobile devices remains stuck to the left. I have tried multiple solutions and even searched for answers here on stackoverflow, but none of the suggestions have helped me so far. The only way I was able to center it was by using jQuery, but I don't want to rely on that.
Here is the code snippet:
<!DOCTYPE html>
<html>
<head>
<title>Website</title>
<link href="css/configcss.css" rel="stylesheet" type="text/css">
</head>
<body onLoad="MM_preloadImages('pictures/Layout/Button/homeo.png','pictures/Layout/Button/grafiko.png','pictures/Layout/Button/webo.png','pictures/Layout/Button/reklamo.png','pictures/Layout/Button/fotoo.png','pictures/Layout/Button/videoo.png','pictures/Layout/Button/muziko.png')">
<div id="headbackground">
<div id="headcontent">
<div id="language"> <a href="index.html"><img src="pictures/tr.png" width="40" height="24" alt="tr"></a>
...
....
.....
</div>
AND THE STYLE/CSS: The problem lies in the #contentbody section while the rest are centered properly.
body {
background-color:#FFF;
margin-left:0px;
margin-top:0px;
margin-right:0px;
font-family:Verdana, Geneva, sans-serif;
}
#headbackground {
...
....
a.link{
background:transparent url(a-bg.png) no-repeat -81px bottom;
}