[HTML] Small banner Problem.
#1

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:
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.
Reply
#2

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
Reply
#3

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
Reply
#4

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
Reply
#5

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.
Reply
#6

it was moved from the general section
Reply
#7

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
Reply
#8

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.
Reply
#9

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
Reply
#10

what the fuck u talking m8 ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)