The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

changing code so doesn't follow screen

2 posters

Go down

changing code so doesn't follow screen Empty changing code so doesn't follow screen

Post by Adam360 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
Adam360
Forumember

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

http://GameBase.betaboard.net

Back to top Go down

changing code so doesn't follow screen Empty Re: changing code so doesn't follow screen

Post by Guest 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
avatar
Guest
Guest


Back to top Go down

changing code so doesn't follow screen Empty Re: changing code so doesn't follow screen

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

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

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

changing code so doesn't follow screen Empty Re: changing code so doesn't follow screen

Post by Adam360 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
Adam360
Forumember

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

http://GameBase.betaboard.net

Back to top Go down

changing code so doesn't follow screen Empty Re: changing code so doesn't follow screen

Post by LGforum 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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

changing code so doesn't follow screen Empty Re: changing code so doesn't follow screen

Post by Adam360 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
Adam360
Forumember

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

http://GameBase.betaboard.net

Back to top Go down

changing code so doesn't follow screen Empty Re: changing code so doesn't follow screen

Post by LGforum 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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

changing code so doesn't follow screen Empty Re: changing code so doesn't follow screen

Post by Guest 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.
avatar
Guest
Guest


Back to top Go down

changing code so doesn't follow screen Empty Re: changing code so doesn't follow screen

Post by Adam360 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
Adam360
Forumember

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

http://GameBase.betaboard.net

Back to top Go down

Back to top

- Similar topics

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