image manipulation - Post ID 236190
I'd appreciate somebody out there telling me how to assign a unique identifier to an image such that I can manipulate that image in my css file.
I have tried: <img id = "missionpic" src="Mission_San_Buenaventura.png" width=800 height=600 alt="" border="0" >
and in the css file
.missionpic {float: right;
margin-top: 5px;
margin-right: 10px
}
What am I doing wrong. Thanks
I have tried: <img id = "missionpic" src="Mission_San_Buenaventura.png" width=800 height=600 alt="" border="0" >
and in the css file
.missionpic {float: right;
margin-top: 5px;
margin-right: 10px
}
What am I doing wrong. Thanks
<img id = "missionpic" src="Mission_San_Buenaventura.png" width=800 height=600 alt="" border="0" >
Remove the space between the id="missonpic"
Remove the space between the id="missonpic"

Adam East wrote:
<img id = "missionpic" src="Mission_San_Buenaventura.png" width=800 height=600 alt="" border="0" >
Remove the space between the id="missonpic"
<img id = "missionpic" src="Mission_San_Buenaventura.png" width=800 height=600 alt="" border="0" >
Remove the space between the id="missonpic"

Adam East wrote:
<img id = "missionpic" src="Mission_San_Buenaventura.png" width=800 height=600 alt="" border="0" >
Remove the space between the id="missonpic"
<img id = "missionpic" src="Mission_San_Buenaventura.png" width=800 height=600 alt="" border="0" >
Remove the space between the id="missonpic"

Thanks - tried it and no difference.
Try changing .missionpic to #missionpic in css.
Keith
Keith
Keith W Jones wrote:
http://www.htmldog.com/guides/css/intermediate/classid/
Keith
http://www.htmldog.com/guides/css/intermediate/classid/
Keith
That did it. Thanks. Whoopee. Now I know how.
Glad you have got it sorted.
Keith
Keith
Keep in mind that another fix could also be to change the HTML line to say:
<img class="missionpic"
And leaving the dot in front of the missionpic selector in the CSS, which would then denote it as a class rather than an ID.
It all depends on if the attributes you are assigning to that image will be reused somewhere else on the same page.
ID = using it only once per page
CLASS = using it multiple times on a page.
Hope that helps some.
<img class="missionpic"
And leaving the dot in front of the missionpic selector in the CSS, which would then denote it as a class rather than an ID.
It all depends on if the attributes you are assigning to that image will be reused somewhere else on the same page.
ID = using it only once per page
CLASS = using it multiple times on a page.
Hope that helps some.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.