Mobiele site

Status
Niet open voor verdere reacties.

jorenman

Gebruiker
Lid geworden
27 jul 2013
Berichten
222
Ik ben op dit moment bezig met het maken van peter-wouters.nl

Alleen is er een probleempje bij de mobiele versie, je hebt een witte balk aan de rechterkant, weet iemand hoe ik die weghaal?

Dit is de stylesheet van de mobiele versie:
HTML:
/*
Theme Name: Peter Wouters
Author: Joren Wouters
Description: Een website gemaakt voor Peter Wouters
License: GNU General Public License
License URI: license.txt
*/
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;
 }
 body, p {
 margin: 0;
 }
h1 {
font-family: Verdana;
font-size: 30px;
}
h2 {
font-family: Verdana;
font-size: 25px;
}
h3 {
font-family: Verdana;
font-size: 20px;
}
h4 {
font-family: Verdana;
font-size: 15px;
}
h5 {
font-family: Verdana;
font-size: 10px;
}
h6 {
font-family: Verdana;
font-size: 5px;
}
 #header {
 margin: 0;
 height: 120px;
 width: 100%;
 background: #03325e;
 float: left;
 }
#social {
margin-top: 20px;
margin-left: 10%;
float: left;
width: 20%;
}
 #logo {
 margin-top: 5px;
 margin-left: 10%;
width: 60%;
 float: left;
 color: #fff;
 font-family: Verdana;
 font-style: italic;
 font-size: 40px;
 }
 #headmenu {
margin: 0;
width: 100%;
 height: 60px;
 padding: 0;
 }
 .menu, .menu li, .menu ul, .menu a, .menu span {
	margin:0;padding:0;border:0;outline:0;list-style:none;}
.menu {
	position:relative;z-index:597;float:left;}
.menu li {
	float:left;min-height:1px;line-height:1;vertical-align:middle;}
.menu li:hover {
	position:relative;z-index:599;cursor:pointer;}
.menu a, .menu span {
	display:block;text-decoration:none;}
.menu ul {
	visibility:hidden;position:absolute;top:100%;left:0;z-index:598;}
.menu ul li {
	float:none;}
.menu ul ul {
	top:0;left:100%;
	width: 150%; }
.menu li:hover > ul {
	visibility:visible;}

/* opmaak van menu */
#headmenu ul.menu li {
	width: auto;
	line-height: 60px;
	padding: 0 50px;
	font-family: verdana, geneva, sans-serif;
	background: #03325e;
	font-size: 14px;
	color: #b8b8b8;
	white-space: nowrap;
}
#headmenu ul.menu a {
color: #b8b8b8;
}
#headmenu ul.menu li:hover > a,
#headmenu ul.menu li:hover > span {
	color: #fff;
}
#headmenu ul.menu ul li  {
width: 100%;
}

 

 #body {
 margin: 0;
 float: left;
 width: 100%;
 }

 #front {
 margin: 0;
 background: linear-gradient(#2470A4, #78B1CE);
 height: 570px;
 width: 100%;
 float: left;
 }
 #front img {
 margin-top: 74px;
 margin-left: 15%;
 }
 #slagzin {
 margin-top: 90px;
 margin-left: 15%;
 width: 35%;
 float: left;
 }
 #slagzin p {
 font-family: Verdana;
 font-size: 21px;
 color: #fff;
 margin-bottom: 30px;
 }
 #slagzin li {
 width: 50%;
 background: #fa6900;
 border-bottom: 3px solid #d05700;
 display: block;
 list-style: none;
 line-height: 30px;
 text-align: center;
 font-family: Verdana;
 font-size: 14px;
 border-radius: 4px;
 }
 #slagzin li a {
 text-decoration: none;
 color: #fff;
 }
 #slagzin li:hover {
 border-bottom: 3px solid #fa6900;
 }
 .header1 {
 font-family: Verdana;
 font-size: 55px;
 color: #fff;
 margin-bottom: 30px;
 }
 #boxes {
 margin-top: 40px;
 float: left;
 width: 100%;
margin-bottom: 20px;
 }
 #box1 {
 margin-left: 10%;
 float: left;
 width: 20%;
 }
 #box2, #box3 {
 height: 240px;
 width: 20%;
 margin-left: 10%;
 float: left;
 }
 #box1, #box2, #box3 {
 font-family: Verdana;
 font-size: 14px;
 color: #777;
 }
 .header3, .header3 a, .header3 a:visited {
 margin-top: 10px;
 margin-bottom: 20px;
 font-size: 17px;
 color: #1b222e;
 text-decoration: none;
 }
 #blog {
 margin-top: 20px;
 margin-bottom: 20px;
 width: 100%;
 float: left;
 }
 .blog {
 margin: 0 auto;
 width: 87%;
 border-top: 1px solid #777;
 }
 .header4 {
 color: #1b222e; 
 font-family: Verdana;
 font-size: 22px;
 margin-top: 40px;
 margin-left: 2%;
 }
 #posts {
 margin-left: 2%;
 margin-top: 40px;
 }
 #posts article {
 float: left;
 width: 25%;
 margin-left: 7.5%;
 }
 #posts article:first-child {
 margin: 0;
 }
 #stats2 {
 margin-bottom: 20px;
 border-bottom: 1px solid #777;
 color: #777;
 }
 .entry-title, .entry-title a, .entry-title a:visited {
  margin-top: 10px;
 margin-bottom: 10px;
 font-size: 20px;
 color: #1b222e;
 text-decoration: none;
 }
 .entry-title a:hover {
color: #000;
}
 .entry-content {
 margin-bottom: 10px;
 font-family: Verdana;
 font-size: 15px;
 color: #000;
 }
 .entry-content a:hover {
 text-decoration: none;
 }
 .entry-content a, .entry-content a:visited {
 color: blue; 
 }
.entry-content ol, .entry-content ul {
margin-left: 23px;
margin-bottom: 10px;
}
.entry-content p {
font-family: Verdana;
font-size: 15px;
margin-bottom: 10px;
}
 
 #info {
 margin: 0;
 margin-top: 30px;
 width: 100%;
 float: left;
 background: #2c7ebe;
 line-height: 70px;
 color: #fff;
 text-align: center;
 font-family: Verdana;
 font-size: 18px;
 }
 .header5 {
 color: #fff;
 margin-bottom: 10px;
 font-family: Verdana;
 font-size: 16px;
 }
 #page {
 width: 55%;
 margin-left: 14%;
 float: left;
 margin-bottom: 40px;
 }
 #page p {
 margin-top: 10px;
 margin-bottom: 20px;
 font-family: Verdana;
 color: #000;
 }
#single {
 width: 55%;
 margin-left: 14%;
 float: left;
 margin-bottom: 40px;
 }


.header6 {
 color: #1b222e;
 margin-top: 49px;
 margin-bottom: 20px;
 font-family: Verdana;
 font-size: 22px;
 padding-bottom: 20px;
 border-bottom: 1px solid #777;
 width: 100%;
 }
 #pagesidebar {
 margin-top: 50px;
 margin-left: 74%;
 margin-bottom: 20px;
 width: 20%;
 font-size: 15px;
font-family: Verdana;
 }
#pagesidebar ul, #pagesidebar ol {
margin-left: 16px;
font-size: 15px;
font-family: Verdana;
}
 .header7 {
 color: #1b222e;
 margin-top: 40px;
 margin-bottom: 20px;
 font-family: Verdana;
 font-size: 22px;
 padding-bottom: 20px;
 border-bottom: 1px solid #777;
 width: 100%;
 }
 #pagesidebar ul {
 margin-top: 20px;
 }
 #pagesidebar a, #pagesidebar a:visited {
 color: blue;
 text-decoration: none;
 }
 #pagesidebar a:hover {
 color: #000;
 }
 #stats  {
 margin-top: 15px;
 border-bottom: 1px solid #777;
 font-family: Verdana;
 color: #555;
 }
 #stats a, #stats a:visited {
 color: blue;
 text-decoration: none;
 }
 #stats a:hover {
 color: #000;
 }
 .entry-meta2 {
 margin-bottom: 11px;
 }
 .entry-title2, .entry-title2 a, .entry-title2 a:visited {
  color: #1b222e;
text-decoration: none;
 font-family: Verdana;
 font-size: 22px;
 margin-top: 20px;
margin-bottom: 15px;
 width: 100%;
 }
 .entry-content2, .entry-content3 {
 margin-top: 40px;
 font-family: Verdana;
font-size: 15px;
 }
.entry-content2 ol, .entry-content2 ul {
margin-left: 25px;
font-family: Verdana;
font-size: 15px;
margin-bottom: 10px;
}
 .entry-content2 p, .entry-content3 p {
 margin-top: 10px;
 margin-bottom: 20px;
 font-family: Verdana;
 color: #000;
 font-size: 15px;
 }
.entry-content3 li {
margin-left: 18px;
font-family: Verdana;
font-size: 15px;
}

 #article {
 margin-top: 70px;
 }
 #article:first-child {
 margin: 0;
 }
 #archive a, #archive a:visited {
 color: blue;
 text-decoration: none;
 }
 #archive a:hover {
 color: #000;
 }
#single label {
font-family: Verdana;
 color: #03325e;
font-size: 15px;
}
#opmerking {
font-family: Verdana;
font-size: 15px;
height: 200px;
width: 50%;
}
#single input[type="text"]{
font-family: Verdana;
font-size: 15px;
}
#submit {
height: 40px;
width: 20%;
border-radius: 2px;
background: #03325e;
color: #fff;
text-align: center;
font-family: Verdana;
outline: none;
}
 #footer {
 margin: 0;
 width: 100%;
 float: left;
 background: #03325e;
 }
 #column1 {
 margin-top: 50px;
 margin-left: 12%;
 width: 100%;
 color: #fff;
 font-family: Verdana;
 font-size: 12px;
 }
 #under {
 margin-left: 11%;
 margin-top: 20px;
 border-top: 1px solid #b8b8b8;
 padding-bottom: 20px;
 width: 80%;
 }
 #footermenu {
 margin-left: 1%;
 padding: 0;
 margin-top: 20px;
 }
 #footermenu ul {
 list-style: none;
 margin-bottom: 20px;
 padding: 0;
 }
 #footermenu ul li {
 float: left;
 display: block;
 padding-left: 5px;
 padding-right: 5px;
 font-family: Verdana;
 font-size: 12px;
 }
 #footermenu ul li:first-child {
 padding-left: 0;
 }
 #footermenu ul li a {
 color: #b8b8b8;
 text-decoration: none;
 }
 #footermenu ul li a:hover {
 color: #fff;
 }
 #under p, #under p a, #under p a:visited {
 font-family: Verdana;
 font-size: 12px;
 text-align: right;
 color: #b8b8b8;
 text-decoration: none;

 }
 #under p a, #under p a:visited {
 font-weight: bold;
 }
 #under p a:hover {
 color: #fff;
 }
 
Hoe kan ik je mobiele website bereiken?

Op mobiel pakt ie de desktop versie en m.***.nl werkt niet :confused:
 
Ik heb zelf het probleem al opgelost.
Welke mobiel gebruik je en weet je hoe groot die is?

Ik wil namelijk de site voor al mobieltjes optimaliseren.
 
Ik zag in je html staan:
media="only screen and (max-width: 320px), only screen and (max-device-width: 480px)"
Dit werkt met oude mobiles, maar "media" werkt niet meer met de huidige FHD mobiles.
Je kunt namelijk niet detecteren wat de schermafmeting is bij een FHD resolutie. Is het een Android tv box (40") of is het een Android phone (5")? Beide hebben Full HD.

Of gebruik je mobile detect (php) ? Hiermee kun je redelijk bepalen of het een phone, tablet of desktop is, maar zulke scripts lopen altijd achter bij de werkelijkheid.
 
Laatst bewerkt:
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan