Help please How do i put image in css?

#banner

{

position: relative;
background-color:#666;
display:block;

}

#banner .image 

{
background-image: url("logo.jpg");
background-repeat: no-repeat center bottom;
background-attachment: fixed;

}

.imageresp

{

width:100%;

}

html

<div id="banner">

	<div class="image"> </div>

	

</div>

My image file is in my css folder it just called ‘logo.jpg’

simple use <img> element and give it a src attribute with a value of your image name (if they files are in same folder)

1 Like

oops, you use a background image, my mistake, let me check again

Can you give me the code in such a way i can work with it? The image currently doesn’t display

and what exactly is your question? The image seems to display fine?

it seems you give wrong values to background-repeat, look at the background repeat docs

1 Like

can you upload the image and use that url? so i actually have an image to work with. Preferable, put your whole code online, that is easier

1 Like

i put your code in a bin, that is easier, now i will look at it

1 Like

it’s also not mobile friendly as my nav crush.

simple get rid of background-attachment: fixed; to achieve what you want to achieve

if you want to prevent this, use col-xs and col-sm for smaller screen (see botstrap website)

1 Like