Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mapping Multiople Images in CSS

Status
Not open for further replies.

sanders720

Programmer
Aug 2, 2001
421
US
#map1 works great. I tried to add #map2 to my CSS, and it would not load the image. Is it permissable to have mnore than one map in a CSS?

Also, in the HTML code below, what does the id do for me?

Thanks ahead of time for any help you can provide.


HTML file:

<div id="map2">
<div id="menu12">
<a href="../JobsDatasheet_Image.jpg" id="jobs1">></a>
</div>
</div>

CSS file:

#map1 {
background-image: url(MainMenu_Image.jpg);
width: 922px;
height: 472px;
position: relative;
}

#menu1 {
position: absolute;
top: 228px;
left: 290px;
}

#menu2 {
position: absolute;
top: 264px;
left: 290px;
}

#map2 {
background-image: url(Jobs_Image.jpg);
width: 907px;
width: 743px;
position: relative;
}

#menu12 {
position: absolute;
top: 228px;
left: 290px;
}
 
I don't know what you're asking. Is it permissable to have more than one ID in a webpage? Of course.

When you give a tag an ID, this allows you to describe a separate style for just this element, as you have done.

If I have the following:
Code:
#stuff {
    font-size: 20px;
    color: red;
    }

div {
    font-size: 12px;
    color: black;
    }
And then...
Code:
<div id="stuff">Text Here</div>
<div>Text Here</div>

The div with an id of 'stuff' will have 20 pixel red text, while the other div will have 12 pixel black text.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top