Align image vertically in Browser Window
#1
I want to create an html page with an image aligned vertically and horizontally to the middle of the screen.
Norammly, I'd use a table like:
<table width="100%" height="100%">
...But I notice my new browser, Opera, doesn't show this correctly. Is there any alternative ?
Norammly, I'd use a table like:
<table width="100%" height="100%">
...But I notice my new browser, Opera, doesn't show this correctly. Is there any alternative ?
#2
Scooby Regular
You should be able to do it in a table, or using a layer.
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">content</td>
</tr>
</table>
or use
<div></div>, then place it using CSS, or use similar to above.
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">content</td>
</tr>
</table>
or use
<div></div>, then place it using CSS, or use similar to above.
#4
Dreamweaver - tried adding valign but that still doesn't work in Opera (works in IE though)
Is it Opera is crap or is it IE breaks foramtting rules ?
Opera uses Sun's Java - the definitive Java!
Microsoft aren't allowed to give their version away freely anymore.
Just want to make sure my code is compatible across browsers thats all.
[Edited by DazV - 2/21/2003 2:34:37 PM]
Is it Opera is crap or is it IE breaks foramtting rules ?
Opera uses Sun's Java - the definitive Java!
Microsoft aren't allowed to give their version away freely anymore.
Just want to make sure my code is compatible across browsers thats all.
[Edited by DazV - 2/21/2003 2:34:37 PM]
#5
Scooby Regular
IE is far too forgiving with HTML, it's the worst possible choice for developing with because whilst it will look ok there it's designed for people that don't want to know anything so it will "just work".
Your table declarations aren't valid HTML anyway, there is no height attribute in a table element, IE will still parse it though. I'd use CSS.
Steve.
Your table declarations aren't valid HTML anyway, there is no height attribute in a table element, IE will still parse it though. I'd use CSS.
Steve.
#6
Scooby Regular
Agree with Steve, it is just more forgiving.
I always test my sites in all three browsers, though IE is the easiest to design for.
I quite like browsing with Opera, but it just wont handle certain things, i.e. dynamic drop downs.
CSS would be the way to go - use positioning.
I always test my sites in all three browsers, though IE is the easiest to design for.
I quite like browsing with Opera, but it just wont handle certain things, i.e. dynamic drop downs.
CSS would be the way to go - use positioning.
#7
Scooby Regular
Daz - just tried the valign table method and it works finr in my Opera 5.02
http://www.kreature.co.uk/test.htm
http://www.kreature.co.uk/test.htm
Trending Topics
#8
DreamWeaver - I'm running Opera7 and it don't work! Even your page doesn't work.
Go figure. Still, I'd like to perhaps do it the proper way and use CSS - which I've never done before.
Any hints ?
Go figure. Still, I'd like to perhaps do it the proper way and use CSS - which I've never done before.
Any hints ?
Thread
Thread Starter
Forum
Replies
Last Post
hardcoreimpreza
Computer & Technology Related
21
11 October 2015 03:40 PM