SA-MP Forums Archive
[HTML] Small banner Problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: [HTML] Small banner Problem. (/showthread.php?tid=66539)



[HTML] Small banner Problem. - Mr.Lennart - 22.02.2009

Hello everyone.

I have made myself a website for my small community, and I am wanted to add a banner in the middle of my page.
I added it, and when I look at the page and the banner, the banner is centerd, on my 19 inch screen yes!

But when someone with a inch around 22, the banner is kinda to the left. And in my html code it says, center.

The code:

Quote:

<div style="position: absolute; width: 100px; height: 100px; z-index: 1; left: 319px; top: 234px" id="layer1">
<a target="_blank" href="http://www.gametracker.com/server_in...6.218:37015/">
<img src="http://cache.www.gametracker.com/ser.../b_560x95.png" border="0" width="560" height="95"></a></div>

How it looks with 22 inch monitor:
Quote:
http://img32.picoodle.com/img/img32/...1m_60d5f76.jpg
How it looks with 19 inch monitor (good):
Quote:

I also tried with <center></center> stuff in it. nothing seems to work.

Anyone has ideas for a fix?

Try it if you're having your 22 inc screen:

www.lennypub.com

Thanks,
Lennart.


Re: I need help with a small HTML problem. - JaYmE - 22.02.2009

That is counter strike not sa-mp ?

forum.sa-mp.com

Quote:

<div style="position: absolute; width: 100px; height: 100px; z-index: 1; left: 319px; top: 234px" id="layer1">
<a target="_blank" href="http://www.gametracker.com/server_in...6.218:37015/">
<img src="http://cache.www.gametracker.com/ser.../b_560x95.png" border="0" width="560" height="95"></a></div>

At the top of your source code change it to

Quote:

<div style="position: absolute; width: 100px; height: 100px; z-index: 1; left: 675px; top: 234px" id="layer1">
<a target="_blank" href="http://www.gametracker.com/server_in...6.218:37015/">
<img src="http://cache.www.gametracker.com/ser.../b_560x95.png" border="0" width="560" height="95"></a></div>
<!-- ImageReady Slices (index.psd) -->
And that will center it
I bolded the part i changed


Re: [HTML] Small banner Problem. - Mr.Lennart - 22.02.2009

No don't fix, it will go to the right on my 19inch screen.. maybe for people with more inch, it might go center .. but for 19, it'll go more to the right cause it was already centr'd with the old leftx


Re: [HTML] Small banner Problem. - boylett - 22.02.2009

you can't centre absolute divs, as they're position has to be.. absolute. you can try left:50%; right:50%; but i doubt that'll work


Re: I need help with a small HTML problem. - Norn - 22.02.2009

Quote:
Originally Posted by JaYmE
That is counter strike not sa-mp ?

forum.sa-mp.com

Quote:

<div style="position: absolute; width: 100px; height: 100px; z-index: 1; left: 319px; top: 234px" id="layer1">
<a target="_blank" href="http://www.gametracker.com/server_in...6.218:37015/">
<img src="http://cache.www.gametracker.com/ser.../b_560x95.png" border="0" width="560" height="95"></a></div>

At the top of your source code change it to

Quote:

<div style="position: absolute; width: 100px; height: 100px; z-index: 1; left: 675px; top: 234px" id="layer1">
<a target="_blank" href="http://www.gametracker.com/server_in...6.218:37015/">
<img src="http://cache.www.gametracker.com/ser.../b_560x95.png" border="0" width="560" height="95"></a></div>
<!-- ImageReady Slices (index.psd) -->
And that will center it
I bolded the part i changed
This is the everything and nothing section.


Re: [HTML] Small banner Problem. - Popz - 23.02.2009

it was moved from the general section


Re: [HTML] Small banner Problem. - 1337pr0 - 23.02.2009

Quote:
Originally Posted by MrLennart` @
<div style="position: absolute; width: 100px; height: 100px; z-index: 1; left: 319px; top: 234px" id="layer1">
<a target="_blank" href="http://www.gametracker.com/server_in...6.218:37015/">
<img src="http://cache.www.gametracker.com/ser.../b_560x95.png" border="0" width="560" height="95"></a></div>
Ideally, it shouldn't be absolute:

Код:
<div style="width: 2%; margin-left: 49%; margin-right: 49%;height: 100px; z-index: 1;" id="layer1">
	<a target="_blank" href="http://www.gametracker.com/server_in...6.218:37015/">
	<img src="http://cache.www.gametracker.com/ser.../b_560x95.png" border="0" width="560" height="95"></a></div>
Absolute is bad for things like this - If your whole site is set to absolute, then it's time to update it



Re: [HTML] Small banner Problem. - Mr.Lennart - 23.02.2009

Not working mate, it'll go on the top of the page.

Anyways someone has fixed this problem for me, I dunno how i will ask him anyways, it has something to cause I made this site inside with Photoshop, and sliced it with imageready, so all things are images, to many images.


Re: [HTML] Small banner Problem. - kc - 23.02.2009

Quote:
Originally Posted by MrLennart` @
Not working mate, it'll go on the top of the page.

Anyways someone has fixed this problem for me, I dunno how i will ask him anyways, it has something to cause I made this site inside with Photoshop, and sliced it with imageready, so all things are images, to many images.
Yeah, you could say that

You can kiss ****** rankings goodbye


Re: [HTML] Small banner Problem. - Mr.Lennart - 23.02.2009

what the fuck u talking m8 ?