php - css which depends on a div tag value -


i developing website uses sql , php generate div block. div block have associated number (the range of 1 - 100). need css display div element in relation associated number (e.g. associated number margin-left % value).

how do this?

thanks

supposing $result number generated php, write script this

<?php $result = 1; echo '<div style="margin-left:'.$result.'">div content</div>'; ?> 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -