/ / Responsive Layout-Problem der Stiftung - zurb-foundation

Foundation Responsive Layout Problem - zub-foundation

Ich baue ein benutzerdefiniertes Grid mit mobilen Gerätenals eine Priorität, da die meisten Benutzer der Website Zugriff auf die Website über mobile Geräte benötigen, während sie den Nachthimmel beobachten. Das Problem ist, wenn ich die Seite auf einem mobilen Gerät rende, bekomme ich das:

Entschuldige meine Links Samsung Galaxy S4 Bildschirmfoto

jetzt wenn ich aus dem web lade bekomme ich diese

Hier ist mein Index.html Prototyp. Mein College hat uns nie CSS-Frameworks beigebracht und auch keine mobilen responsiven Designs. Ich lese seit fast einem Monat direkt auf beiden, aber das ist mein erster wirklicher Versuch, beides zu benutzen.

<!DOCTYPE html>
<!--[if IE 8]>               <html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Fort Bend Astronomy Club &raquo; Home</title>


<link rel="stylesheet" href="stylesheets/app.css" />
<link rel="stylesheet" href="stylesheets/main.css" />


<script src="javascripts/vendor/custom.modernizr.js"></script>

</head>
<body>
<!-- Begin Navigation -->
<section class="navigation">
<header class="small-12 columns">
<nav class="top-bar">
<ul class="title-area">
<li class="name">
<h1 class="center-hack"><a href="index.html"><img src="/images/images/fbac_logo.png" class="logo" alt="Fort Bend Astronomy Club" /></a></h1>
</li>
<li class="toggle-topbar menu-icon">
<a href="#"><span></span></a>
</li>
</ul>

<section class="top-bar-section">
<ul class="left">
<li class="divider"></li>
<li class="active">
<a href="#">Home</a>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a href="#">About</a>
<ul class="dropdown">
<li>
<a href="#">About FBAC</a>
</li>

<li>
<a href="#">History of FBAC</a>
</li>

<li class="has-dropdown">
<a href="#">Club Donations</a>
<ul class="dropdown">
<li>
<a href="#">Donate to FBAC</a>
</li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">Club Meetings</a>
<ul class="dropdown">
<li>
<a href="#">
General Information
</a>
</li>
<li>
<a href="#">Meeting Archives</a>
</li>
</ul>
</li>
<li>
<a href="#">
FBAC Articles Archive
</a>
</li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a href="#">
Club Programs
</a>
<ul class="dropdown">
<li class="has-dropdown">
<a href="#">
Astronomy on Wheels
</a>
<ul class="dropdown">
<li>
<a href="#">
General Information
</a>
</li>
<li>
<a href="#">
AOW Contact Form
</a>
</li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">
FBAC Volunteer T-Shirt Program
</a>
<ul class="dropdown">
<li>
<a href="#">
General Information
</a>
</li>
<li>
<a href="#">
Shirt Request Form
</a>
</li>
</ul>
</li>
<li>
<a href="#">
Telescope Loaner Program
</a>
</li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">
Club Observing
</a>
<ul class="dropdown">
<li>
<a href="#">
George Observatory
</a>
</li>

<li>
<a href="#">
East Dome
</a>
</li>
<li>
<a href="#">
HMNS/FBAC Memo of Understanding
</a>
</li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">
Club Tools
</a>
<ul class="dropdown">
<li>
<label>
Public Tools
</label>
</li>
<li>
<a href="#">
Observing List/Star Charts
</a>
</li>
<li>
<a href="#">
Calendar
</a>
</li>
<li>
<a href="#">
Web Links
</a>
</li>
<li>
<label>
Members
</label>
</li>
<li>
<a href="#">
Manage Profile/Renewal
</a>
</li>
<li>
<a href="#">
Borrow Telescope
</a>
</li>
<li>
<a href="#">
East Dome Website
</a>
</li>
</ul>
</li>
<li>
<a href="#">
Join FBAC
</a>
</li>
</ul>

<ul class="right">
<li class="has-form">
<a href="#" class="small button">
Login
</a>
</li>
</ul>
</section>
</nav>
</header>
</section>
<!-- End Navigation -->

<!-- Begin Content Area -->
<section class="small-9 columns content-area">
<article class="article-box">
<div class="headers">
<h1 class="article-title">
Test Story
</h1>
<h3 class="bylines">
By: <a href="#">Test User</a> on 11/10/2013 at 09:00
</h3>
</div>
<div class="story">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis egestas tincidunt mauris. Proin gravida quis magna at congue. Nam ac eleifend leo, sed hendrerit dolor. Curabitur sed velit posuere, auctor urna eu, adipiscing sem. Maecenas ac nisi id velit gravida pharetra. Quisque dapibus ligula non massa sollicitudin, sed pulvinar enim luctus. Quisque dapibus bibendum tempor. Proin tristique, purus non elementum laoreet, tellus magna volutpat orci, ut pellentesque lectus metus eget nulla. Integer nec dui nec dolor interdum pulvinar. Quisque tincidunt egestas eros. Fusce accumsan nisl vel faucibus egestas. Morbi quis ultrices arcu. Sed interdum ac metus id venenatis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In hac habitasse platea dictumst.

Vivamus neque lectus, consectetur sed arcu consequat, vehicula volutpat massa. Quisque a erat molestie, laoreet tellus a, faucibus nisi. Nunc dignissim augue volutpat massa malesuada tincidunt. Etiam placerat purus vitae ante blandit fringilla. Proin molestie arcu sed lobortis tristique. Maecenas sed condimentum dui. Curabitur accumsan, enim in tristique eleifend, purus urna malesuada lorem, nec auctor mauris lacus tristique nunc.</p>

<p>Sed bibendum at ipsum et tincidunt. Nulla ac mi nec justo interdum commodo. Duis sagittis vestibulum rutrum. Donec tristique id odio vitae pellentesque. Donec adipiscing facilisis ligula et tristique. Aliquam nec placerat dui. Phasellus dignissim nunc ac scelerisque tristique. Curabitur et enim nec nisl elementum feugiat. Duis suscipit magna ut scelerisque interdum. Vestibulum sit amet sem congue, condimentum orci ac, imperdiet mauris. Donec quis purus sit amet lacus blandit malesuada vel blandit ante. Aliquam erat volutpat. Mauris dignissim lacus at diam porttitor, semper gravida urna dapibus.</p>

<p>Praesent varius varius mauris, sed hendrerit odio pretium et. Nunc tincidunt sit amet sem id vestibulum. Duis hendrerit cursus tortor, sit amet eleifend nibh luctus ullamcorper. Aenean et est consectetur, venenatis eros non, malesuada nunc. Sed adipiscing dignissim blandit. Sed et aliquet enim. Duis pulvinar id purus non pellentesque. Aliquam lacinia blandit purus id mattis. Praesent id pharetra quam. Quisque aliquam et orci at consequat. Nulla sit amet metus egestas, luctus erat in, fringilla tortor. Nam consectetur, erat ac laoreet pretium, erat magna fringilla diam, et euismod ante neque et dui. Pellentesque eu mollis ligula, eget elementum urna. Curabitur quam nunc, sollicitudin eget orci non, pharetra aliquet sem.</p>

<p>Cras mattis tincidunt justo, eget molestie turpis ultricies sit amet. Donec pharetra orci nisi, a congue eros scelerisque vel. Donec pulvinar gravida mauris et ullamcorper. Nulla facilisi. Phasellus at est vulputate, ultricies velit in, euismod mauris. Vivamus sed eros tincidunt, faucibus libero a, auctor neque. Aenean a pellentesque massa. Mauris lacinia justo nibh, nec molestie arcu rhoncus in. In non tellus a diam posuere blandit in nec metus. Nullam fermentum turpis non tempus placerat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut vulputate aliquet quam, nec dignissim elit. Fusce dignissim lorem id dictum laoreet. Fusce blandit eget diam a fringilla.</p>
</div>
</article>

<article class="article-box">
<div class="headers">
<h1 class="article-title">
Test Story
</h1>
<h3 class="bylines">
By: <a href="#">Test User</a> on 11/10/2013 at 09:00
</h3>
</div>
<div class="story">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis egestas tincidunt mauris. Proin gravida quis magna at congue. Nam ac eleifend leo, sed hendrerit dolor. Curabitur sed velit posuere, auctor urna eu, adipiscing sem. Maecenas ac nisi id velit gravida pharetra. Quisque dapibus ligula non massa sollicitudin, sed pulvinar enim luctus. Quisque dapibus bibendum tempor. Proin tristique, purus non elementum laoreet, tellus magna volutpat orci, ut pellentesque lectus metus eget nulla. Integer nec dui nec dolor interdum pulvinar. Quisque tincidunt egestas eros. Fusce accumsan nisl vel faucibus egestas. Morbi quis ultrices arcu. Sed interdum ac metus id venenatis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In hac habitasse platea dictumst.

Vivamus neque lectus, consectetur sed arcu consequat, vehicula volutpat massa. Quisque a erat molestie, laoreet tellus a, faucibus nisi. Nunc dignissim augue volutpat massa malesuada tincidunt. Etiam placerat purus vitae ante blandit fringilla. Proin molestie arcu sed lobortis tristique. Maecenas sed condimentum dui. Curabitur accumsan, enim in tristique eleifend, purus urna malesuada lorem, nec auctor mauris lacus tristique nunc.</p>

<p>Sed bibendum at ipsum et tincidunt. Nulla ac mi nec justo interdum commodo. Duis sagittis vestibulum rutrum. Donec tristique id odio vitae pellentesque. Donec adipiscing facilisis ligula et tristique. Aliquam nec placerat dui. Phasellus dignissim nunc ac scelerisque tristique. Curabitur et enim nec nisl elementum feugiat. Duis suscipit magna ut scelerisque interdum. Vestibulum sit amet sem congue, condimentum orci ac, imperdiet mauris. Donec quis purus sit amet lacus blandit malesuada vel blandit ante. Aliquam erat volutpat. Mauris dignissim lacus at diam porttitor, semper gravida urna dapibus.</p>

<p>Praesent varius varius mauris, sed hendrerit odio pretium et. Nunc tincidunt sit amet sem id vestibulum. Duis hendrerit cursus tortor, sit amet eleifend nibh luctus ullamcorper. Aenean et est consectetur, venenatis eros non, malesuada nunc. Sed adipiscing dignissim blandit. Sed et aliquet enim. Duis pulvinar id purus non pellentesque. Aliquam lacinia blandit purus id mattis. Praesent id pharetra quam. Quisque aliquam et orci at consequat. Nulla sit amet metus egestas, luctus erat in, fringilla tortor. Nam consectetur, erat ac laoreet pretium, erat magna fringilla diam, et euismod ante neque et dui. Pellentesque eu mollis ligula, eget elementum urna. Curabitur quam nunc, sollicitudin eget orci non, pharetra aliquet sem.</p>

<p>Cras mattis tincidunt justo, eget molestie turpis ultricies sit amet. Donec pharetra orci nisi, a congue eros scelerisque vel. Donec pulvinar gravida mauris et ullamcorper. Nulla facilisi. Phasellus at est vulputate, ultricies velit in, euismod mauris. Vivamus sed eros tincidunt, faucibus libero a, auctor neque. Aenean a pellentesque massa. Mauris lacinia justo nibh, nec molestie arcu rhoncus in. In non tellus a diam posuere blandit in nec metus. Nullam fermentum turpis non tempus placerat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut vulputate aliquet quam, nec dignissim elit. Fusce dignissim lorem id dictum laoreet. Fusce blandit eget diam a fringilla.</p>
</div>
</article>
</section>
<!-- End Content Area -->

<!-- Begin Side Bar Area -->
<section class="small-3 columns right-sidebar">
<div class="clocks">
Clock Scripts
</div>
<div class="weather">
Weather API
</div>
<div class="lunar">
Moon Clock
</div>
<div class="banners">
Banners
</div>
</section>
<!-- End Side Bar Area -->

<!-- Begin Footer Section -->
<section class="small-12 columns upper-footer">
<div class="small-4 columns memberships">
Memberships
</div>

<div class="small-4 columns hccs">
HCCS Partner
</div>

<div class="small-4 columns hmns">
HMNS Partner
</div>
</section>

<section class="small-12 columns lower-footer">
<div class="small-12 columns sitemap">
Sitemap
</div>

<div class="small-12 columns copyrights">
<p class="copyright-details">
Copyright Fort Bend Astronomy Club 1984-2014&#169;<br />
Web Design by Nathan Jones Copyright 2013-2014&#169;
</p>
</div>
</section>
<!-- End Footer Section -->

<!-- Script Section -->
<script>
document.write("<script src=" +
("__proto__" in {} ? "javascripts/vendor/zepto" : "javascripts/vendor/jquery") +
".js></script>");
</script>

<script src="javascripts/foundation/foundation.js"></script>

<script src="javascripts/foundation/foundation.alerts.js"></script>

<script src="javascripts/foundation/foundation.clearing.js"></script>

<script src="javascripts/foundation/foundation.cookie.js"></script>

<script src="javascripts/foundation/foundation.dropdown.js"></script>

<script src="javascripts/foundation/foundation.forms.js"></script>

<script src="javascripts/foundation/foundation.interchange.js"></script>

<script src="javascripts/foundation/foundation.joyride.js"></script>

<script src="javascripts/foundation/foundation.magellan.js"></script>

<script src="javascripts/foundation/foundation.orbit.js"></script>

<script src="javascripts/foundation/foundation.placeholder.js"></script>

<script src="javascripts/foundation/foundation.reveal.js"></script>

<script src="javascripts/foundation/foundation.section.js"></script>

<script src="javascripts/foundation/foundation.tooltips.js"></script>

<script src="javascripts/foundation/foundation.topbar.js"></script>


<script>
$(document).foundation();
</script>
</body>
</html>

Meine Frage ist das: Wenn ich das Raster auslege, sollte ich Small-12 für jede Inhaltszone verwenden? oder ist mein Code in Bezug auf die Aufteilung der Bereiche korrekt (wie klein-9 für Inhalt und kleine-3 für die Seitenleiste? Wenn mein Code korrekt ist, brauche ich Wrapper, um die Website richtig zu rendern?

Antworten:

0 für die Antwort № 1

Eine grundlegende UI-Regel für Mobilgeräte, die Sie befolgen können, besteht darin, keine Seitenleisten in mobilen Geräten zu haben. Dies kann bei Verwendung von Foundation etwa so sein

<div class="row">

<div class="small-12 large-9 columns">
// Main content here
</div>

<div class="small-12 large-3 columns">
// Sidebar here
</div>

</div>

Zumindest hätte ich das getan. Zeige auch nur wichtige Dinge für Nutzer auf Mobilgeräten. Es ist wirklich nicht notwendig, denselben Inhalt auf Mobilgeräten anzuzeigen, wie Sie es auf dem Desktop gezeigt hätten.

In Ihrem Fall ist die Seitenleiste der Widgets nicht so wichtig (scheint nicht wichtig) und kann daher unten angezeigt oder vollständig ausgeblendet werden


Verwandte Fragen


Kommentare (0)

Einen Kommentar hinzufügen