Ich habe ein Problem, ich habe ein HTML-Problem, ich weiß nicht, ob ich die beste Methode verwende, so ist hier mein Problem: Everthing ist ok: http://screencast.com/t/uJmffaxE
Wenn ich mehr Platz haben, hier die Probleme beginnen: mein Code http://screencast.com/t/1z1GRhOLK
hier:Was ist die beste Methode, um die richtige HTML aus meiner PHP-Schleife
<div id="wrap-categories" class="clearfix">
<?php if($this->categories !== false): ?>
<ul>
<?php foreach($this->categories as $category):?>
<li>
<strong><?=$category['name']?></strong><br />
<?php if($this->artistsHelper($category['id']) !== false): ?>
<?php foreach($this->artistsHelper($category['id']) as $artist): ?>
<p><?=$artist['name']?></p>
<?php endforeach; ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
Und hier ist wie das Markup aussieht, wenn generiert:
<div id="wrap-categories" class="clearfix">
<ul>
<li>
<strong>Dj's</strong><br />
<p>Big fuckin'artists</p>
<p>asddssdadsasda</p>
<p>Gigle bossu</p>
</li>
<li>
<strong>Make up</strong><br />
<p>Cool</p>
</li>
<li>
<strong>Mamam</strong><br />
</li>
<li>
<strong>Tata</strong><br />
</li>
<li>
<strong>Dawaj</strong><br />
</li>
<li>
<strong>Sexy</strong><br />
</li>
<li>
<strong>Bitch</strong><br />
</li>
<li>
<strong>Armin</strong><br />
</li>
<li>
<strong>Lol</strong><br />
</li>
<li>
<strong>Gogu</strong><br />
</li>
<li>
<strong>Penal</strong><br />
</li>
<li>
<strong>Asasin</strong><br />
</li>
</ul>
</div>
Die CSS
#wrap-categories ul li{
float:left;
margin-right:10px;
}
Jede Hilfe bitte ?!
Ist Ihr Problem, dass das Markup mit allen Leerzeichen groß erscheint? – ChaosPandion
http://screencast.com/t/1z1GRhOLK hier sollten die Kategorien (starke Titel) unter die erste Kategorie fallen ... – Uffo
Wenn Sie tabellarische Daten anzeigen, verwenden Sie eine Tabelle. – Sampson