The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

changing code so doesn't follow screen

View previous topic View next topic Go down

changing code so doesn't follow screen

Post by Adam360 on December 22nd 2011, 4:47 am

I want it so that the images do not follow the screen

Code:
<ul style="position:fixed;left:0;top:0%;list-style:none;">
<li><a href="http://www.facebo############4345381676" target="_blank"><img src="http://tinyurl.#######" border="0" width="40px" /></a></li>
<br><li><a href="http://www.twitter#######g" target="_blank"><img src="http://tinyurl.com######q7y" border="0" width="40px" /></a></li>
<br><li><a href="http://www.youtube.c########g" target="_blank"><img src="http://tinyurl.com#######z5e" border="0" width="40px" /></a></li>
</ul>

used # to hide links so cannot be classed as advertising =]

Adam360
Forumember

Male Posts : 866
Reputation : 11
Language : English
Location : England

http://GameBase.betaboard.net

Back to top Go down

Re: changing code so doesn't follow screen

Post by Guest on December 22nd 2011, 10:50 am

What do you mean? If you want that the links not be redirected in new tab of the browser:
Code:
<ul style="position:fixed;left:0;top:0%;list-style:none;">
<li><a href="http://www.facebo############4345381676"><img src="http://tinyurl.#######" border="0" width="40px" /></a></li>
<br /><li><a href="http://www.twitter#######g"><img src="http://tinyurl.com######q7y" border="0" width="40px" /></a></li>
<br /><li><a href="http://www.youtube.c########g"><img src="http://tinyurl.com#######z5e" border="0" width="40px" /></a></li>
</ul>
P.S. I changed also <br> with <br /> to meet XHTML. Wink

Guest
Guest


Back to top Go down

Re: changing code so doesn't follow screen

Post by LGforum on December 22nd 2011, 1:39 pm

Change where it says 'position:fixed' to 'position:absolute'

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: changing code so doesn't follow screen

Post by Adam360 on December 23rd 2011, 1:54 am

Spankers wrote:What do you mean? If you want that the links not be redirected in new tab of the browser:
Code:
<ul style="position:fixed;left:0;top:0%;list-style:none;">
<li><a href="http://www.facebo############4345381676"><img src="http://tinyurl.#######" border="0" width="40px" /></a></li>
<br /><li><a href="http://www.twitter#######g"><img src="http://tinyurl.com######q7y" border="0" width="40px" /></a></li>
<br /><li><a href="http://www.youtube.c########g"><img src="http://tinyurl.com#######z5e" border="0" width="40px" /></a></li>
</ul>
P.S. I changed also <br> with <br /> to meet XHTML. Wink
I want it so that when I scroll down... the images do not scroll down with me, they stay by the banner at the top

Change where it says 'position:fixed' to 'position:absolute'

That doesn't work, the images ended up not appearing

Adam360
Forumember

Male Posts : 866
Reputation : 11
Language : English
Location : England

http://GameBase.betaboard.net

Back to top Go down

Re: changing code so doesn't follow screen

Post by LGforum on December 23rd 2011, 3:51 am

It is the position:fixed bit which is making your images follow you as you scroll down, if you change it correctly then of course it will work.

Here is the modified HTML:

Code:

        <ul style="position:absolute;left:0;top:0%;list-style:none;">
        <li><a href="http://www.facebo############4345381676"><img src="http://tinyurl.#######" border="0" width="40px" /></a></li>
        <br /><li><a href="http://www.twitter#######g"><img src="http://tinyurl.com######q7y" border="0" width="40px" /></a></li>
        <br /><li><a href="http://www.youtube.c########g"><img src="http://tinyurl.com#######z5e" border="0" width="40px" /></a></li>
        </ul>

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: changing code so doesn't follow screen

Post by Adam360 on December 23rd 2011, 3:55 am

It isn't working...

When the code says fixed, the images show but follow the screen when I scroll down

When the code says absolute the images just don't appear.

Adam360
Forumember

Male Posts : 866
Reputation : 11
Language : English
Location : England

http://GameBase.betaboard.net

Back to top Go down

Re: changing code so doesn't follow screen

Post by LGforum on December 23rd 2011, 2:30 pm

Have you checked the top left corner of the page? That's where they should be.
Change the values of 'top' and 'left'

It makes no sense that they should disappear.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: changing code so doesn't follow screen

Post by Guest on December 23rd 2011, 10:01 pm

You do need to remove "position:fixed" from the UL tag. However, you haven't provided enough information to solve your problem.

Where do you want the images displayed? Where is this code...template? Homepage message? Announcement?

Once you provide this info, someone should be able to solve your problem.

Guest
Guest


Back to top Go down

Re: changing code so doesn't follow screen

Post by Adam360 on December 24th 2011, 1:43 am

I want the images answer on the page as I'm going to use a different code to move them

the code is in my announcements, as is on my other forum.

it works when it says fixed... just not when it says absolute

Adam360
Forumember

Male Posts : 866
Reputation : 11
Language : English
Location : England

http://GameBase.betaboard.net

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum