|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do you centre an image on the screen?
ive got a webpage that has a table in it with an image in that. I want to be able to centre the image on the screen vertically as well as horizontally as the browser resizes itself.
I have centre it horizontally as you make the browser wider and thinner, but when you make the browser taller and smaller the image sits still, how do i centre it? |
|
#2
|
||||
|
||||
|
RE: How do you centre an image on the screen?
You'll need to use JavaScript. Try google and javascript sites (for example http://www.javascript.com/ )
|
|
#3
|
|||
|
|||
|
RE: How do you centre an image on the screen?
no, i figured it out, you need to use tableheight = 100% with tablewidth = 100%
|
|
#4
|
|||
|
|||
|
RE: How do you centre an image on the screen?
It depends...
If you want to do it without reloading page, you will need to use javascript or something like this... If you mean to do it when window is open and page is loades than followind script should be enough (but you need to reaload your page when you will resize your window and you want to center your image. I think this should do it: <table width="100%" height="100%" align="center" valign="center"> <tr> <td> image </td> </tr> </table> |
|
#5
|
|||
|
|||
|
RE: How do you centre an image on the screen?
I think <td> needs centering, not <table>.. And it should work without reloading (at least it does in IE)...
|
|
#6
|
|||
|
|||
|
RE: RE: How do you centre an image on the screen?
Quote:
True... Sorry, my mistake. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > How do you centre an image on the screen? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|