Marquee is not working when i use table in css

i try to work in marquee which get contents from file And try to use c

Page 1 of 1

5 Replies - 1515 Views - Last Post: 30 July 2008 - 11:51 AM Rate Topic: -----

#1 Kalpesh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 28-July 08

Marquee is not working when i use table in css

Post icon  Posted 29 July 2008 - 12:02 AM

<table width="100%" class="sofT">	
			<tr>
			<td class="helpBod"> &nbsp &nbsp &nbsp &nbsp<span class="store2"> Hottest Deals</span><sup  class="header_help1"> &nbsp New! </sup></td>
			</tr>
		<tr>
		  <td class="helpHed">
		  <marquee height="110" width="210"  scrollamount="10" scrolldelay="2" direction="UP" onmouseover="this.stop()" onmouseout="this.start()" border="0">
		  <br>
		  <?php
		  $hm="http://www.kalpesh.com/include";
				$file1 = "$hm/news.txt";
				$lines = file($file1);
				$count = count($lines);
				$newsf = false;
				$linkf = true;
				foreach ($lines as $line_num => $line)
				{
					if($newsf == false && $linkf == true)
					{
						$spos = strpos($line,"NEWS=");
						if($spos != null && $spos > 0)
							{
								 $spos2 = strpos($line,'"',($spos+7));
	
								$newsstr = substr($line,7,($spos2-($spos+6)));
								 //echo("<div align=left style=\"color: ".$fontcol.";\" >".$newsstr."</div>");	
 									$newsf = true;
							}
					}
					else if( $linkf == true &&  $newsf == true)
					{
						$spos = strpos($line,"LINK=");
						if($spos != null && $spos > 0)
						{
								$spos2 = strpos($line,'"',($spos+7));
	
								$linkstr = substr($line,7,($spos2-($spos+6)));
							?>
								<div align="left" style="margin: 0px; text-decoration: none">
								<IMG height="7" src="images/black-bullet.gif" width="4" vspace="3"> &nbsp;
								<a href="<?php echo $linkstr?>" class="store3"><?php echo $newsstr?></a></div><br>
								<?php
									$newsf = false;
									$linkf = true;?>
						<?php
						}
						else
						{
							  $linkf = false;
						?>
							
						<?php
						}
					}
				}?>
		  <br>
		  </marquee>
		  <div align=center style="background-color: #FFFFCC; color: #660099; font-size: 15px;">
		  </td>
		  </tr>
		  </table>



** Edit ** :code:

Is This A Good Question/Topic? 0
  • +

Replies To: Marquee is not working when i use table in css

#2 no2pencil  Icon User is offline

  • Original Digital Gansta
  • member icon

Reputation: 4465
  • View blog
  • Posts: 24,913
  • Joined: 10-May 07

Re: Marquee is not working when i use table in css

Posted 29 July 2008 - 12:07 AM

In your code :

<a href="<?php echo $linkstr?>" class="store3"><?php echo $newsstr?></a></div><br>

Change to

<a href="<?php echo $linkstr; ?>" class="store3"><?php echo $newsstr; ?></a></div><br>


You are missing the ending semi colon in your echo statements.

Let us know how that works out for you :D
Was This Post Helpful? 0
  • +
  • -

#3 steelseth  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-July 08

Re: Marquee is not working when i use table in css

Posted 29 July 2008 - 02:06 PM

Actually there is nothing wrong with
<?php echo $linkstr?>
since there is only a single statement the semicolon can be omitted.

The problem is that http://www.kalpesh.c...nclude/news.txt is NOT returning anything. The marquee is working but there is nothing there to see.

Also the correct way to check against strpos is
$spos = strpos($line,"NEWS="); if($spos !== false)
and NOT

 $spos = strpos($line,"NEWS=");  if($spos != null && $spos > 0) 
because if the string you are searching is found at position 0 then your statement will evaluate to false.
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Original Digital Gansta
  • member icon

Reputation: 4465
  • View blog
  • Posts: 24,913
  • Joined: 10-May 07

Re: Marquee is not working when i use table in css

Posted 29 July 2008 - 03:00 PM

Awesome! Good find.
Was This Post Helpful? 0
  • +
  • -

#5 Kalpesh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 28-July 08

Re: Marquee is not working when i use table in css

Posted 29 July 2008 - 11:37 PM

View Postno2pencil, on 29 Jul, 2008 - 12:07 AM, said:

In your code :

<a href="<?php echo $linkstr?>" class="store3"><?php echo $newsstr?></a></div><br>

Change to

<a href="<?php echo $linkstr; ?>" class="store3"><?php echo $newsstr; ?></a></div><br>


You are missing the ending semi colon in your echo statements.

Let us know how that works out for you :D


It work fine without using css. But when i try to include css with marquee , it does not work. i give u following css which i use with this marquee.Please Help me.

.store2{
	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size:13px;	font-style:normal; font-weight:bold; color:#3020AA; text-decoration:none; 
}


table.sofT
{ text-align: center;
font-family: Verdana;
font-weight: normal;
font-size: 11px;
color: #404040;
width: 200px;
background-color: #fafafa;
border: 1px #6699CC solid;
border-collapse: collapse;
border-spacing: 0px; } 

.header_help1{
	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size:11px;	font-style:normal; font-weight:plain; color:#FC1900;}

.store3{
	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size:11px;	font-style:normal; font-weight:plain; color:#3123FF;}

td.helpHed
{ 
background-color: #FFCEE7;
text-align: left;
font-family: Verdana;
font-weight: bold;
font-size: 11px;
color: #404040; }

td.helpBod
{ border-bottom: 1px solid #9CF;
border-top: 0px;
border-left: 1px solid #9CF;
border-right: 0px;
text-align: left;
text-indent: 10px;
font-family: Verdana, sans-serif, Arial;
font-weight: normal;
font-size: 11px;
color: #404040;
background-color: #fafafa; }



** Edit ** :code:

Attached File(s)

  • Attached File  news.txt (339bytes)
    Number of downloads: 35

Was This Post Helpful? 0
  • +
  • -

#6 steelseth  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-July 08

Re: Marquee is not working when i use table in css

Posted 30 July 2008 - 11:51 AM

The whole things runs fine in IE6, IE7, FF2 provided that i read news.txt locally and not from your server.
There is however some problem with FF3 where the marquee is NOT scrolling.
If you remove
border-collapse: collapse;
it will fix the problem.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1