html - Background image not showing CSS/PHP -


the background image not showing. must missing going bit cross-eyed trying work out is.

this have:

<div class="hero_text item">   <h3><?php echo $slide['slide_title']; ?></h3>   <p>     <?php echo $slide[ 'slide_desc']; ?>   </p>   <img style="background-image:url(<?php echo $slide['slide_image']; ?>)"></img> </div> 

and css:

.hero_text img {     background-repeat: no-repeat;     background-attachment: fixed;     background-size: cover;     height: 600px; } 

i think want use:

<img src="<?php echo $slide['slide_image']; ?>" /> 

the img tag adding images html.

if want background image, set on div:

<div style="background-image:url('<?php echo $slide['slide_image']; ?>')"></div> 

Comments

Popular posts from this blog

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -

php - Autoloader issue not returning Class -