Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Align image vertically in Browser Window

Thread Tools
 
Search this Thread
 
Old 21 February 2003, 02:19 PM
  #1  
DazV
Scooby Regular
Thread Starter
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Post

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 ?
Old 21 February 2003, 02:24 PM
  #2  
Dream Weaver
Scooby Regular
 
Dream Weaver's Avatar
 
Join Date: Feb 2000
Location: Lancashire
Posts: 9,844
Received 0 Likes on 0 Posts
Post

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.
Old 21 February 2003, 02:25 PM
  #3  
Dream Weaver
Scooby Regular
 
Dream Weaver's Avatar
 
Join Date: Feb 2000
Location: Lancashire
Posts: 9,844
Received 0 Likes on 0 Posts
Post

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]
Old 21 February 2003, 02:32 PM
  #4  
DazV
Scooby Regular
Thread Starter
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Post

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]
Old 21 February 2003, 02:36 PM
  #5  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

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.
Old 21 February 2003, 03:27 PM
  #6  
Dream Weaver
Scooby Regular
 
Dream Weaver's Avatar
 
Join Date: Feb 2000
Location: Lancashire
Posts: 9,844
Received 0 Likes on 0 Posts
Post

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.
Old 21 February 2003, 03:54 PM
  #7  
Dream Weaver
Scooby Regular
 
Dream Weaver's Avatar
 
Join Date: Feb 2000
Location: Lancashire
Posts: 9,844
Received 0 Likes on 0 Posts
Post

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

http://www.kreature.co.uk/test.htm
Old 21 February 2003, 04:19 PM
  #8  
DazV
Scooby Regular
Thread Starter
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Post

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 ?
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
hardcoreimpreza
Computer & Technology Related
21
11 October 2015 03:40 PM
FuZzBoM
Wheels, Tyres & Brakes
16
04 October 2015 09:49 PM
powerwrx
Non Scooby Related
21
03 October 2015 11:31 PM
Ganz1983
Subaru
5
02 October 2015 09:22 AM



Quick Reply: Align image vertically in Browser Window



All times are GMT +1. The time now is 03:25 AM.