HTML Question
- Started
- Last post
- 26 Responses
- samb
I'm looking to centre an image horizontally and vertically so it appears in the centre of a browser no matter what size screen, any ideas?
- silencer0
THE SIMPLETONS WAY TO DO IT IS TO MAKE A table with one column and amke the width and height 100%, then set thealignment to centre middle and drop your image in like this.
- k0na_an0k0
what he said.
- silencer0
dammit I forgot about that shit
U got mail ;)
- silencer0
How does one post code so it appears in the forum? Can I use the slash star star slash?
- tomkat0
true, but height=1005 is always crucial in some browsers..
- tomkat0
100% that was
- silencer0
what does 1005 mean?
- silencer0
cool
- maze0
table with 100% height will not work on safari and some other browsers, but i forgot which...
- Elfangio0
Make one table width 100% height 100% vertical-align middle align center...
I would also put margins = 0
The javascript you have here:
is not working in mozila Mac, the vertical-align is not correct -middle.
Hasta
p.s. javascript to center a image?!?!?
- samb0
i know java script wasn;t the best idea, but was struggling for ideas.
cheers
- silencer0
table100%width height works fine on safari from where I'm standing I mean sitting ;)
- tomkat0
bit more complicated, but working:
http://www.wpdfd.com/editorial/w…
- Elfangio0
Well I dunno in what Safari you test it, but in my works just fine
- Elfangio0
You can test it here:
- Elfangio0
Feel free to copy the code :D lol
- jevad0
Do not use tables - use CSS
- Elfangio0
Why? Tables dont bite, and to center an image in a browser the simplest and easier and faster are tables...be smart!
I also use CSS for a lot of things, but i am not 'fanatic'
Hasta
- jevad0
yeah "be smart!" - stop using tables
- Elfangio0
Like you do in your website?!? LOLOL