1Danke
ERLEDIGT
JA
JA
ANTWORTEN
7
7
ZUGRIFFE
849
849
EMPFEHLEN
-
Hallo,
ich will Bildchen in <li> stecken und sie dann gitterförmig (5 Bilder rüber und 5 Bilder runter) anordnen.
Wenn man's so macht, kann man entweder alle Bilder in einer Reihe horizontal oder in einer Reihe vertikal machen:
Code :1 2 3 4 5
<ul> <li><img /></li> <li><img /></li> <li><img /></li> </ul>
Kann man die da aber eben auch irgendwie gitterförmig anordnern, immer "Zeilenschaltung" nach 5 Bildern und dann drunter wieder 5.
Oder MUSS das eher in die Richtung aufgebaut werden?:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<ul> <li> <img /> <img /> <img /> </li> <li> <img /> <img /> <img /> </li> <li> <img /> <img /> <img /> </li> </ul>
-
07.06.11 10:52 #2
du könntest zb den Float nach 5 Elementen in Reihe einfach aufheben mit einer extra Klasse des Listen-Elements:
Und diese Klasse im CSS dementsprechend definieren.HTML-Code:<ul> <li> <img /> </li> <li> <img /> </li> <li class="floatEnd"> <img /> </li> <li> <img /> </li> <li> <img /> </li> </ul>
Die Schweine von heute sind unsere Schnitzel von morgen!
-
Ok, vielen Dank für den Tipp... ich will das mal probieren
EDIT: Probiert! ...kann es sein, dass das nur so funktioniert, dass man die erste Klasse z.B. ins 1-2-3-vierte macht und dann aber immer ins 1-2-dritte? Klappt bei mir nämlich nur so, dass einheitlich drei in jeder Reihe stehen.Geändert von Fantasmo (07.06.11 um 12:05 Uhr)
-
07.06.11 12:25 #4
Zeig doch mal dein CSS von den betroffen Zeilen.
Die Schweine von heute sind unsere Schnitzel von morgen!
-
Naja, ich teste das grade ganz plump mit jCarousel (die einfache Version http://sorgalla.com/projects/jcarous...ic_simple.html , also noch nicht groß eigene CSS dafür erstellt. Für <ul> und <li> ist da festgelegt.
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14
ul { left: 0; margin: 0; overflow: hidden; padding: 0; position: relative; top: 0; width: 950px; } li { float: left; list-style: none outside none; }
DIVs und Krempel drumrum dürften eigentlich nicht relevant sein, denk ich mal...
Hier der Teil HTML (Also damit erziele ich immer drei in einer Reihe):
Code :1 2 3 4 5 6 7 8 9 10 11 12 13
<ul id="mycarousel" class="jcarousel-skin-tango"> <li><img src="http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/75/199481072_b4a0d09597_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/57/199481087_33ae73a8de_s.jpg" width="75" height="75" alt="" /></li> <li class="reiherunter"><img src="http://static.flickr.com/77/199481108_4359e6b971_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg" width="75" height="75" alt="" /></li> <li class="reiherunter"><img src="http://static.flickr.com/58/199481218_264ce20da0_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/69/199481255_fdfe885f87_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg" width="75" height="75" alt="" /></li> <li class="reiherunter"><img src="http://static.flickr.com/70/229228324_08223b70fa_s.jpg" width="75" height="75" alt="" /></li> </ul>
Faaalls ich es schaffe will ich das in Textpattern reintun und automatisch füllen lassen... Da kann man schon irgendwie jedem x-ten <li> eine Klasse ranschreiben lassen...ich kann aber schon jetzt ahnen, dass das komisch/schwer wird, wenn da einmal vier <li> gezählt und dann drei gezählt werden sollen.
-
08.06.11 14:16 #6
Mir ist grad eingefallen das es wie von mir beschrieben nicht funktionieren kann. Denn das ListenElement das den Float beendet bräuchte ja eigentlich danach soft wieder den Float damit die folgenden Elemente auch wieder neben an stehn.
Was du machen könntest wäre ein Extra-Listenelement einzubauen an der Stelle wo der Float beendet werden soll.
HTML-Code:<ul id="mycarousel" class="jcarousel-skin-tango"> <li><img src="http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/75/199481072_b4a0d09597_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/57/199481087_33ae73a8de_s.jpg" width="75" height="75" alt="" /></li> <li style="clear:left;"> <li class="reiherunter"><img src="http://static.flickr.com/77/199481108_4359e6b971_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg" width="75" height="75" alt="" /></li> <li style="clear:left;"> <li class="reiherunter"><img src="http://static.flickr.com/58/199481218_264ce20da0_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/69/199481255_fdfe885f87_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg" width="75" height="75" alt="" /></li> <li style="clear:left;"> <li class="reiherunter"><img src="http://static.flickr.com/70/229228324_08223b70fa_s.jpg" width="75" height="75" alt="" /></li> </ul>
Die Schweine von heute sind unsere Schnitzel von morgen!
-
Also ich glaube, irgendwie kann man das - speziell nun in diesem Fall für jCarousell - irgendwie durch eine Konfigurationsdatei angeben. (Im Download als Text in einer HTML-Datei dabei http://sorgalla.com/jcarousel/)
Hier wird irgendwas erkärt, aber ich verstehst nicht. Ich kann durchaus ganz vielen NEBENeinander anzeigen, aber es bleibt einzeilig. Hat sich jemand schonmal mit diesem Bildkarussell beschäftigt und weiß wie es einzustellen geht?
Mit so fremdem CSS ist schon doof und dann schreibt da scheinbar auch immernoch ne js-Datei inline-Styles ran.
EDIT:
Außerdem hab ich was (wieder)gefunden, wo ich eine gitterförmige Anordnung mal mit DIVs gemacht hatte, müsste ja dann auch mit IMGs gehen. Braucht man eigentlich gar nicht die LIs unbedingt
Code :1 2 3 4 5 6
div { display: inline-block; float: left; margin-bottom: 10px; margin-right: 10px; }
Vielleicht bringt das jetzt jemandem anders was... mein jCarousel-Ding hat immernoch keine Gitteranordnung
.
Geändert von Fantasmo (17.06.11 um 15:20 Uhr)
-
So nun hab ich also eine Seite gefunden, wo jemand diese Galerie so verwendet. Ein bisschen *schnippschnapp* und hier hab ich dann mal die CSS-Dateien dazu... ich denke ich hab keine Datei vergessen. JS und Dinge die standardmäßig zu diesem Galerie-PlugIn dazu gehören, müsste sich jeder selbst auf der offiziellen Seite runterladen.
Evtl. Bildlinks in den CSS-Datein stimmt mitunter natürlich nicht, das müsste jeder bei sich anpassen.
jquery.jcarousel.css:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
/** * This <div> element is wrapped by jCarousel around the list * and has the classname "jcarousel-container". */ .jcarousel-container { position: relative; } .jcarousel-clip { z-index: 2; padding: 0; margin: 0; overflow: hidden; position: relative; } .jcarousel-list { z-index: 1; overflow: hidden; position: relative; top: 0; left: 0; margin: 0; padding: 0; } .jcarousel-list li, .jcarousel-item { float: left; list-style: none; /* We set the width/height explicitly. No width/height causes infinite loops. */ width: 75px; height: 75px; } /** * The buttons are added dynamically by jCarousel before * the <ul> list (inside the <div> described above) and * have the classnames "jcarousel-next" and "jcarousel-prev". */ .jcarousel-next { z-index: 3; display: none; } .jcarousel-prev { z-index: 3; display: none; }
skin.css
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
/* -------------------------------------------- */ /* ------------ LARGE (INDEX PAGE) ------------ */ /* -------------------------------------------- */ .jcarousel-skin-tango .jcarousel-container { /*background: #FFF;*/ margin-left: 29px; /* IMPORTANT! DO NOT REMOVE! */ margin-right: 29px; /* IMPORTANT! DO NOT REMOVE! */ } .jcarousel-skin-tango .jcarousel-container-horizontal { width: 920px; padding-left: 31px; padding-right: 49px; padding-top: 15px; } .jcarousel-skin-tango .jcarousel-clip-horizontal { width: 935px; height: 289px; } .jcarousel-skin-tango .jcarousel-item { width: 308px; height: 289px; } .jcarousel-skin-tango .jcarousel-item-horizontal { margin-right: 5px; } .jcarousel-skin-tango .jcarousel-item-placeholder { background: #fff; color: #000; } /** * Horizontal Buttons */ .jcarousel-skin-tango .jcarousel-next-horizontal { position: absolute; top: 120px; right: -15px; width: 29px; height: 54px; cursor: pointer; background: transparent url(../images/arrow_right.png) no-repeat 0 0; } .jcarousel-skin-tango .jcarousel-prev-horizontal { position: absolute; top: 120px; left: -15px; width: 29px; height: 54px; cursor: pointer; background: transparent url(../images/arrow_left.png) no-repeat 0 0; } /* -------------------------------------------- */ /* ------------ SMALL (ABOUT THE STUDIO PAGE) ------------ */ /* -------------------------------------------- */ .jcarousel-skin-tango-small .jcarousel-container { /*background: #FFF;*/ margin-left: 29px; /* IMPORTANT! DO NOT REMOVE! */ margin-right: 29px; /* IMPORTANT! DO NOT REMOVE! */ } .jcarousel-skin-tango-small .jcarousel-container-horizontal { width: 920px; padding-left: 31px; padding-right: 49px; padding-top: 15px; } .jcarousel-skin-tango-small .jcarousel-clip-horizontal { width: 935px; height: 140px; border-bottom: 1px solid #313131; padding-bottom: 15px; } .jcarousel-skin-tango-small .jcarousel-item { width: 151px; height: 136px; } .jcarousel-skin-tango-small .jcarousel-item-horizontal { margin-right: 5px; } .jcarousel-skin-tango-small .jcarousel-item-placeholder { background: #fff; color: #000; } /** * Horizontal Buttons */ .jcarousel-skin-tango-small .jcarousel-next-horizontal { position: absolute; top: 60px; right: -15px; width: 29px; height: 54px; cursor: pointer; background: transparent url(../images/arrow_right.png) no-repeat 0 0; } .jcarousel-skin-tango-small .jcarousel-prev-horizontal { position: absolute; top: 60px; left: -15px; width: 29px; height: 54px; cursor: pointer; background: transparent url(../images/arrow_left.png) no-repeat 0 0; } /* -------------------------------------------- */ /* ------------ Gallery (PORTFOLIO PAGE) ------------ */ /* -------------------------------------------- */ .jcarousel-skin-tango-gallery .jcarousel-container { /*background: #FFF;*/ margin-left: 29px; /* IMPORTANT! DO NOT REMOVE! */ margin-right: 29px; /* IMPORTANT! DO NOT REMOVE! */ } .jcarousel-skin-tango-gallery .jcarousel-container-horizontal { width: 920px; padding-left: 31px; padding-right: 49px; padding-top: 15px; } .jcarousel-skin-tango-gallery .jcarousel-clip-horizontal { width: 935px; height: 575px; padding-bottom: 10px; } .jcarousel-skin-tango-gallery .jcarousel-item { width: 151px; height: 575px; } .jcarousel-skin-tango-gallery .jcarousel-item-horizontal { margin-right: 7px; } .jcarousel-skin-tango-gallery .jcarousel-item-horizontal img { margin-bottom: 10px; } .jcarousel-skin-tango-gallery .jcarousel-item-placeholder { background: #fff; color: #000; } /** * Horizontal Buttons */ .jcarousel-skin-tango-gallery .jcarousel-next-horizontal { position: absolute; top: 275px; right: -15px; width: 29px; height: 54px; cursor: pointer; background: transparent url(../images/arrow_right2.jpg) no-repeat 0 0; } .jcarousel-skin-tango-gallery .jcarousel-prev-horizontal { position: absolute; top: 275px; left: -15px; width: 29px; height: 54px; cursor: pointer; background: transparent url(../images/arrow_left2.jpg) no-repeat 0 0; }
Nichts zu danken.
Ähnliche Themen
-
[SQLITE] Tabelle in sqlite_master noch vorhanden obwohl Tabelle schon gelöscht
Von waldemar im Forum Relationale DatenbanksystemeAntworten: 0Letzter Beitrag: 21.01.11, 15:24 -
Eine Tabelle mit zwei Datensätzen aus einer weiteren Tabelle verbinden
Von SonMiko im Forum Relationale DatenbanksystemeAntworten: 7Letzter Beitrag: 22.09.10, 15:56 -
MYSQL Zeile einer Tabelle mittels VB.net in eine andere Tabelle kopieren
Von bierber im Forum .NET DatenverwaltungAntworten: 1Letzter Beitrag: 05.05.07, 19:44 -
Bestimmte Einträge aus einer Tabelle in eine andere Tabelle kopieren
Von medico im Forum Relationale DatenbanksystemeAntworten: 2Letzter Beitrag: 29.03.06, 18:42 -
Bestimmte Einträge aus einer Tabelle in eine andere Tabelle kopieren
Von medico im Forum PHPAntworten: 1Letzter Beitrag: 29.03.06, 17:48





Zitieren
Login





