I want to show a png file in background of a div. I have this CSS style for put it in the correct place. I'v tested directly in my HTML and the style works properly. I't doesn't work wen I use php variable.
<?php
if ($RScoluna1['nova'] == 1){
$style = "background-image:url(layout/nova.png); background-repeat:no-repeat; background-position: 220px 0;";
} else {
$style = "";
}
?>
<div class="<?php echo $row_RScoluna1['class_cor']; ?>" style="<?php echo $style; ?>">