I cant make a grid of my layout
-
i tried everything (i dont want to use plugins coz i want to use my own them)
my index.php code
<?php
get_header();if (have_posts()) :
while (have_posts()) : the_post();?><div class=”container”>
<div class=”section group”>
<div class=”col span_1_of_3 “>
<div class=”card “>
<div class=”card-image”>
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail(“medium”);
}?>
<span class=”card-title”>” class=”white-text”> <?php the_title(); ?> </span>
</div>
<div class=”card-content”>
<p><?php the_content(); ?></p>
</div>
<div class=”card-action”>
” class=”button”>Read More…
</div>
</div>
</div>
</div>
</div><?php endwhile;
else:
echo “<p>No Post Found</p>”;
endif;
get_footer();
?>and style.css code
.section {
clear: both;
padding: 0px;
margin: 0px;
}/* COLUMN SETUP */
.col {
display: block;
float:left;
margin: 1% 0 1% 1.6%;
}
.col:first-child { margin-left: 0; }/* GROUPING */
.group:before,
.group:after { content:””; display:table; }
.group:after { clear:both;}
.group { zoom:1; /* For IE 6/7 */ }
/* GRID OF THREE */
.span_3_of_3 { width: 100%; }
.span_2_of_3 { width: 66.13%; }
.span_1_of_3 { width: 32.26%; }/* GO FULL WIDTH BELOW 480 PIXELS */
@media only screen and (max-width: 480px) {
.col { margin: 1% 0 1% 0%; }
.span_3_of_3, .span_2_of_3, .span_1_of_3 { width: 100%; }
}i use materlize css so in it by using m5 tag it divides m10 and makes a grid but here i used external css and code as m5 is not working. anyone knows how can i make a grid possible?
- The topic ‘I cant make a grid of my layout’ is closed to new replies.