ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   Align image vertically in Browser Window (https://www.scoobynet.com/computer-and-technology-related-34/180070-align-image-vertically-in-browser-window.html)

DazV 21 February 2003 02:19 PM

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 ?

Dream Weaver 21 February 2003 02:24 PM

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.

Dream Weaver 21 February 2003 02:25 PM

PS Opera is crap, get IE instead :)

Opera is fast, but doesnt like most javascript

[Edited by Dream Weaver - 2/21/2003 2:25:57 PM]

DazV 21 February 2003 02:32 PM

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]

stevencotton 21 February 2003 02:36 PM

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.

Dream Weaver 21 February 2003 03:27 PM

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.

Dream Weaver 21 February 2003 03:54 PM

Daz - just tried the valign table method and it works finr in my Opera 5.02 :confused:

http://www.kreature.co.uk/test.htm

DazV 21 February 2003 04:19 PM

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 ?


All times are GMT +1. The time now is 12:46 PM.


© 2024 MH Sub I, LLC dba Internet Brands