Add CSS code to the PHP variable.

Source: Internet
Author: User
#scrolling_1 {width:635px; height:240px; overflow:hidden; padding:1px; border:1px solid #999; margin:0 auto; Text-align: Left } #scrollnews_1 {position:absolute; width:645px; height:240px; overflow:hidden; display:inline; top:1; left:1;} #scrollnews_con_1 {width:645px; overflow:hidden;} #scrolling_1 ul {display:block; height:240px; width:645px;} #scrolling_1 ul li {height:240px; width:205px; float:left; overflow:hidden; display:inline; margin-right:10px;} This I want to give the PHP variable value after output.
 After writing this, it's not normal. How do I write it?


Reply to discussion (solution)

for (i=0; i=100; i++) {
The loop's wrong.

Add $ to the variable before
That
for ($i =0; $i =100; $i + +) {

Oh
The above code is incorrectly written.
I wrote it anew.

#scrolling_1 {width:635px; height:240px; overflow:hidden; padding:1px; border:1px solid #999; margin:0 auto; Text-align: Left } #scrollnews_1 {position:absolute; width:645px; height:240px; overflow:hidden; display:inline; top:1; left:1;} #scrollnews_con_1 {width:645px; overflow:hidden;} #scrolling_1 ul {display:block; height:240px; width:645px;} #scrolling_1 ul li {height:240px; width:205px; float:left; overflow:hidden; display:inline; margin-right:10px;} This I want to give the PHP variable value after output.
 After writing this, it's not normal. How do I write it?

echo "* * * * * * * position wrong?? $i useless to output 100 of the same style?

Oh
The above code is incorrectly written.
I wrote it anew.

#scrolling_1 {width:635px; height:240px; overflow:hidden; padding:1px; border:1px solid #999; margin:0 auto; Text-align: Left } #scrollnews_1 {position:absolute; width:645px; height:240px; overflow:hidden; display:inline; top:1; left:1;} #scrollnews_con_1 {width:645px; overflow:hidden;} #scrolling_1 ul {display:block; height:240px; width:645px;} #scrolling_1 ul li {height:240px; width:205px; float:left; overflow:hidden; display:inline; margin-right:10px;} This I want to give the PHP variable value after output.
 After writing this, it's not normal. How do I write it?

What are you writing down there directly?
No double quotes

ID can only be used once, when you loop to the second time, how can you use it again?

Your loop is useless.

Duplicate output of a unified style sheet? Don't know what you're going to do, just get the problem straight.

 
  
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.