Sat, October 31, 2020, 06:41:40
 
Home · Latest · Trends  /  HTML, XML
2

Smarty cycle background HTML CSS

Alternating row colors in smarty
<html>
<head>
<style>
.dark{background-color:#f1f1f1;}
.light{background-color:#fff;}
</style>
</head>
<body>
{foreach $posts as $foo}
<div class="row {cycle values="dark,light"}">
{$foo.something}
</div>
{/foreach}
</body>
</html>
rated 2 times [  2] [ 0]  / comments: 0 / hits: 1750  / 3 years ago, sat, jun 24, 2017, 19:32:15
More From » HTML, XML
 

Comments

There are no comments for this Snippet yet
Username
 
Your Comment
 
Share
Snippets
Image align in bootstrap 4
3 years ago, thu, jun 22, 2017
TinyMCE editor is empty or not + minimum characters
3 years ago, sun, jun 25, 2017
Posted
Jorge

Jorge

Member since Jun 22, 2017
Total Code Snippets: 3
Total Comments: 0
Location: n/a
Following
User not following anyone yet.