php - Html attribute with echo -


i have next html element:

<div class="bar bar-success" style="width: 20%;"><? echo $pass; ?></div> 

now, want width element changed according echo element .

i try next:

 <div class="bar bar-success" style=<? echo $pass; ?>/<? echo $fail; ?>%;><? echo $pass; ?></div> 

but doesn't work. how can it?

this might help....

<div class="bar bar-success" style="width: <?php echo round($pass/$fail); ?>%"><?php echo $pass; ?></div> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -