Print results in a feed merging with spaces (blank line) horizontally

0

I've set up a news feed that reads the information in a bank, but I need instead of each line being printed one after the other, I need an interval between each impression with a blank line to be able to have something like this:

  • printed news 01 (scroll right screen to left)
  • range (no info)
  • printed news 02 (scroll right to left)

The code I'm using is this:

<?php 
//conexão + select 

$query = mysql_query("SELECT"); 
if(mysql_num_rows($query)) { ?> 
<p class=""> 
 <ul class=""> 
  <li class=""> 
   <?php while($ln=mysql_fetch_array($query)) { 
         $feed=$ln['desc_noticias']; 
   ?> 
   <?php echo $feed; ?> 
   <?php } ?> 
  </li> 
   <?php } ?> 
 </ul> 
</p>

CSS:

.marquee {
 width: 100%; 
 margin: 0 auto; 
 margin-top: 0; 
 overflow: hidden; 
 white-space: nowrap; 
 background-color: #20407B; 
 color: white;
 box-sizing: border-box; 
 animation: marquee 50s linear infinite; 
 -webkit-animation: marquee 50s linear infinite;
}
 .marquee:hover {animation-play-state: paused; -webkit-animation-play-state: paused; }

@keyframes marquee {
0%   { text-indent: 27.5em }
100% { text-indent: -105em }
}
@-webkit-keyframes marquee {
0%   { text-indent: 27.5em }
100% { text-indent: -105em }
}

It should be pretty easy, but I can not see a solution. Thanks for the help!

Note: the hints that have been given so far make all the records appear together, interspersed with blank lines, but this is not the solution I need, thanks for the consideration as well, waiting for help!

    
asked by anonymous 04.10.2015 / 23:40

2 answers

0

I would do it this way, to differ from one another:

<?php 
//conexão + select 

$query = mysql_query("SELECT"); 
if(mysql_num_rows($query)) { ?> 
<p class=""> 
 <ul class=""> 
   <?php 
     $linhas = 0; 
     while($ln=mysql_fetch_array($query)) { 
         if($linhas%2==0) $cor = "#F5F5F5"; else $cor = ""; 
         $linhas++;
         $feed=$ln['desc_noticias']; 
   ?> 
  <li class="" style="backgrond-color: <? echo $cor; ?>"> 
   <?php echo $feed; ?> 
  </li> 
   <?php } ?> 
   <?php } ?> 
 </ul> 
</p>
    
05.10.2015 / 00:30
0

This should resolve

    <?php 

    $query = mysql_query("SELECT"); 
    if(mysql_num_rows($query)) { 

    ?> 

<p class=""> 

    <ul class=""> 

        <?php 

        while($ln=mysql_fetch_array($query)) { 
        $feed=$ln['desc_noticias']; 

        ?> 

        <li class=""> 

           <?php echo $feed; ?> 

        </li> 

        <li class=""> 

           <!-- linha em branco -->

        </li> 

        <?php } ?> 

    </ul> 

</p>

<?php } ?> 
    
05.10.2015 / 00:32