4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2018, 08:08:44 AM

Login with username, password and session length
Search:     Advanced search
You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  General / Allgemeines
| |-+  Programming
| | |-+  rows (first / row / last) - How to Add the First and Last Class
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
This topic has not yet been rated!
Author Topic: rows (first / row / last) - How to Add the First and Last Class  (Read 4437 times)
.Infecto
Newbie
*
Offline Offline

Posts: 48

Thank You
-Given: 10
-Receive: 0


View Profile
« on: March 14, 2016, 07:25:34 PM »

Hallo zusammen,

wie bewerkstellige ich es, das ich das erste row immer mit class="item-first" füllen kann?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  while ($image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    
show_image($image_row);
    
$new_images .= $site_template->parse_template("thumbnail_bit");
    
$new_images .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$new_images .= "</tr>\n";
      
$count 0;
    }
  } 
// end while

Erste row immer "item-first"
Zweite row "item"
Und das letzte row immer "item-last"

Wie geht das? Hat da jemand eine Idee und kann mir da abhelfen?

VG
Logged
Sumale.my
Addicted member
******
Offline Offline

Posts: 1768

Thank You
-Given: 168
-Receive: 83

Neverdie


View Profile
« Reply #1 on: March 26, 2016, 12:41:40 AM »

Du kannst hier ganz bequem mit CSS arbeiten: first & last
http://maddesigns.de/last-child-first-child-selektoren-css3-adventskalender-tag-11-514.html

LG
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.165 seconds with 19 queries.
Post your comments here