html - ID or Class on an Image Tag does not work -


i'm trying position images site, , i've given images different ids may position them differently. on css when started positioning wouldn't work. either id or class,

i placed these images inside div check if well, , guess point exact img tags want use.

the code follows:

<--html-->

<div class="resume">     <a  href="#"><img style="height:auto; width:auto; max-width:100px; max-height:100px;"src="imgs/pdf.png" class="pdf" ></a>     <a  href="#"><img id="word" style="height:auto; width:auto; max-width:100px; max-height:100px;"src="imgs/mword.png" ></a>     <img id="pline" style="height:auto; width:auto; max-width:100px; max-height:100px;"src="imgs/line1.png" >     <img id="wline" style="height:auto; width:auto; max-width:100px; max-height:100px;"src="imgs/line2.png" > </div> 

<--css-->

.resume img  {     position:relative;     top:100px; }  .resume img .pdf  {     position: relative;     top:500px; } 

so if me went wrong, appreciate it. thanks!

there should no space between img , .pdf. means img tag containing element (or elements) class .pdf. img.pdf means img tags class.

for id use #pline, there no need use img#pline because id's unique on page, , img #pline incorrect described above.


Comments