Jump to content

Add Two images over a bigger one.


Dragosvr92

Recommended Posts

Ok, so i have a ....

In the bottom right of a 468x60 image, I would like to add two small images about 16x16, each with a link on it.

It would be nice to have the 468x60 image as a background.

 

Does anyone have any idea how to do that?

I have no clue on how to do it myself...  >:(

Link to comment
Share on other sites

you will want the large image to either be position: static (default) or position: relative;

you can make the two little pictures position: absolute and locate them wherever you want..

you also might want to incorporate a z-index here as well..

Link to comment
Share on other sites

I have just made this messy code .......

How may i make the small icon to stay ONLY Inside the main image?

<style>

<!-- 
#BigBanner{
background-color:green;
width:468;
height:60;
}

#Small{
background-color:red;
width:16;
height:16;
position:absolute;
right:690px;
bottom:600px;
}

-->
</style>


<a href="http://TEST.COM">
<div id="BigBanner">

<a href="http://TEST.COM"><div id="Small"></div></a>
</div>
</a>

Link to comment
Share on other sites

No one replyed :'(

I can figure it out how to arrange the little icons. But i dont know how to make the 468x60 image to be the main body.

So that what i put in it, wont get outside it.

 

<style>
<!-- 
#BigBanner{
background-color:green;
width:468;
height:60;
cursor:pointer;
}

#Small{
background-color:red;
width:16;
height:16;
position:absolute;
right:690px;
bottom:600px;
}

#Small:hover{
border-style:solid;
border-color:#98bf21;
}
-->
</style>

<div id="BigBanner" onclick="location.href='{U_INDEX}';">
<div id="Small" onclick="location.href='{U_INDEX}';"></div></div>

Link to comment
Share on other sites

<html>
<head>
<style>
<!-- 
#BigBanner{
background-color:green;
width:468;
height:60;
cursor:pointer;
position: relative;
}

#Small{
background-color:red;
width:16px;
height:16px;
position:absolute;
right:0px;
bottom:0px;
}

#Small:hover, #Small2:hover{
border-style:solid;
border-color:#98bf21;
}

#Small2{
background-color:red;
width:16px;
height:16px;
position:absolute;
right:18px;
bottom:0px;
}
-->
</style>
</head>
<body>

<div id="BigBanner" onclick="location.href='{U_INDEX}';">

<div id="Small2" onclick="location.href='{U_INDEX}';"></div>
<div id="Small" onclick="location.href='{U_INDEX}';"></div>

</div>

</body>
</html>

Link to comment
Share on other sites

<html>
<head>
<style>
<!-- 
.container {
width: 468px;
height: 60px;
position: relative;
}
#BigBanner{
background-color:green;
width:468;
height:60;
cursor:pointer;
position: absolte;
z-index: 1;
}

#Small{
background-color:red;
width:16px;
height:16px;
position:absolute;
right:0px;
bottom:0px;
z-index: 10;
}

#Small:hover, #Small2:hover{
border-style:solid;
border-color:#98bf21;
}

#Small2{
background-color:red;
width:16px;
height:16px;
position:absolute;
right:18px;
bottom:0px;
z-index: 10;
}
-->
</style>
</head>
<body>
<div class="container">
<div id="BigBanner" onClick="location.href='test1.html';"></div>
<div id="Small2" onclick="location.href='test2.html';"></div>
<div id="Small" onclick="location.href='test3.html';"></div>
</div>

</body>
</html>

Link to comment
Share on other sites

I don't know what dotted line you are referring to, but you could always use :active in css:

 

<html>
<head>
<style>
<!-- 
.container {
width: 468px;
height: 60px;
position: relative;
}
#BigBanner{
background-color:green;
width:468;
height:60;
cursor:pointer;
position: absolte;
z-index: 1;
}

#Small{
background-color:red;
width:16px;
height:16px;
position:absolute;
right:0px;
bottom:0px;
z-index: 10;
}

#Small:hover, #Small2:hover{
border-style:solid;
border-color:#98bf21;
}

#Small:active, #Small2:active, #BigBanner:active {
border: 3px dotted #98bf21;
}

#Small2{
background-color:red;
width:16px;
height:16px;
position:absolute;
right:18px;
bottom:0px;
z-index: 10;
}
-->
</style>
</head>
<body>
<div class="container">
<div id="BigBanner" onClick="location.href='test1.html';"></div>
<div id="Small2" onclick="location.href='test2.html';"></div>
<div id="Small" onclick="location.href='test3.html';"></div>
</div>

</body>
</html>

Link to comment
Share on other sites

Well this wont work:

<img class="container">
<img src="pixel.png" id="BigBanner" onClick="location.href='test1.html';"></img>
<img src="pixel.png" id="LinkE" onclick="location.href='test2.html';" title="Link on placed banner"></img>
<img src="pixel.png" id="ContactL" onclick="location.href='test3.html';" title="Contact"></img>
</img>

Cant put <img> tags in another :-\

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.