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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button and Image when scrolling 1

Status
Not open for further replies.

purpleski

IS-IT--Management
Aug 14, 2002
112
FR
Hi

Does anybody know a way of making a button and/or an image stay within the window when you scroll? Hope you understand what I mean.

Regards.

 
Put them inside a <DIV> tag, then reposition the div tag whenever the window scrolls.
 
Thanks for that. I thought it might be something like that but how? I have the following ccs:

#divLogo{
left:0;
position: absolute;
text-align:left;
top:0px;
width:100%;
z-index:500
}

But teh Logo.jpg just disappears when you scroll down. You can see the page at
Hope that you can help.

Regards.
 
Oh, a CSS solution... OK

body {
background-image: url(&quot;mylogo.gif&quot;);
background-attachment: fixed;
background-position: top left;
background-repeat: no-repeat;
background-color: #FFFFFF;
}
 
Thankyou for that perfect you have got a star from me for this.

I actually adapted to fit my purpose which was to put it in front of the menu bar class as follows:

.clBar{
position:absolute;
width:10;
height:10;
background-color:#310031;
layer-background-color:#310031;
background-image: url &quot;../images/headings/purpleskitop.jpg&quot;);
background-attachment: fixed;
background-position: top left;
background-repeat: no-repeat;
z-index: 0;
}

Can the image have a link attached to it?

Another question is there a way of doing the same thing with a button constructed from CSS? ie so it does not move. An example is on the same page now at
Thanks for your help.

As always this forum is excellent.

Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top