Another CSS Help °Dope°

TrueJewix

Member
Aug 9, 2012
332
21
Alright, so I'm learning CSS. Don't be expecting I know everything.

Alright, why isn't this image showing?

My code HTML

My files thing shit.


Thanks,
Bye
 

Vanish

Rising Java Developer
Dec 8, 2013
630
94
Try this instead
Code:
<div class="NewsImg">
</div>
then upload the picture to some website and use this
Code:
div.image {
   content:url(URLHERE);
}
I think this will work? Hopefully.
 

Vanish

Rising Java Developer
Dec 8, 2013
630
94
Alright, so I'm learning CSS. Don't be expecting I know everything.

Alright, why isn't this image showing?

My code HTML

My files thing shit.


Thanks,
Bye
Second try :
Code:
<div class="NewsImg">
<img src="newsbg.jpeg" alt="NAME" width="insertwidth" height="insertheight">
  </a>
  <div class="desc">Add a description of the image here</div>
</div>
i think it wasn't working coz you either put the wrong path or didn't even put the width and height? idek
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
Second try :
Code:
<div class="NewsImg">
<img src="newsbg.jpeg" alt="NAME" width="insertwidth" height="insertheight">
  </a>
  <div class="desc">Add a description of the image here</div>
</div>
i think it wasn't working coz you either put the wrong path or didn't even put the width and height? idek
A broken image is normally the result of a broken path - IMG tags are auto height/width by default so declaring them isn't needed.
 

Snappy

^^^^UpHosting^^^^
Aug 29, 2013
521
43
Second try :
Code:
<div class="NewsImg">
<img src="newsbg.jpeg" alt="NAME" width="insertwidth" height="insertheight">
  </a>
  <div class="desc">Add a description of the image here</div>
</div>
i think it wasn't working coz you either put the wrong path or didn't even put the width and height? idek
Im pretty sure you never have to input the width and height when Im doing my images I just do <img src="filepath.ext" alt="randommm">
 

Users who are viewing this thread

Top