HighDots Forums  

Centering a large image.

Websites/HTML pages critique & reviews Discuss and review existing WWW material (alt.html.critique)


Discuss Centering a large image. in the Websites/HTML pages critique & reviews forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ed
 
Posts: n/a

Default Centering a large image. - 05-18-2005 , 08:16 PM






If I have an image that is much wider and/or higher than the space
available to it on its page , how do I arrange to display it on the page
so that the centre of the image (both in the vertical and horizontal
sense) co-incides with the centre of the page in which it is viewed?

Are there any HTML and/or CSS constructs that will allow me to do this?

Yours truly,
Ed

Reply With Quote
  #2  
Old   
Edwin van der Vaart
 
Posts: n/a

Default Re: Centering a large image. - 05-19-2005 , 07:10 AM






Ed wrote:
Quote:
If I have an image that is much wider and/or higher than the space
available to it on its page , how do I arrange to display it on the page
so that the centre of the image (both in the vertical and horizontal
sense) co-incides with the centre of the page in which it is viewed?

Are there any HTML and/or CSS constructs that will allow me to do this?
Try with to set the image width as 100%.
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://www.evandervaart.nl/ Under construction


Reply With Quote
  #3  
Old   
Els
 
Posts: n/a

Default Re: Centering a large image. - 05-19-2005 , 07:15 AM



Edwin van der Vaart wrote:

Quote:
Ed wrote:
If I have an image that is much wider and/or higher than the space
available to it on its page , how do I arrange to display it on the page
so that the centre of the image (both in the vertical and horizontal
sense) co-incides with the centre of the page in which it is viewed?

Are there any HTML and/or CSS constructs that will allow me to do this?

Try with to set the image width as 100%.
That would stretch the image. Unless that's what the OP wants, I'd go
for displaying at as a background image, with
background-position:center;

To the OP: can you give a URL to show what you are really after?
Is it so that if the page is scrolled, the image has to scroll with
it? Or stay in place? Is the space you have available for it also in
the center of your page? Or is it in another place? Too many variables
to really answer your question.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: House Of Lords - Can´t Find My Way Home


Reply With Quote
  #4  
Old   
Edwin van der Vaart
 
Posts: n/a

Default Re: Centering a large image. - 05-20-2005 , 06:38 PM



Els wrote:
Quote:
Edwin van der Vaart wrote:
Ed wrote:

If I have an image that is much wider and/or higher than the space
available to it on its page , how do I arrange to display it on the page
so that the centre of the image (both in the vertical and horizontal
sense) co-incides with the centre of the page in which it is viewed?

Are there any HTML and/or CSS constructs that will allow me to do this?

Try with to set the image width as 100%.

That would stretch the image.
I thought the image is inside a box e.g.
http://www.evandervaart.nl/index.php?page1=page6
--
Edwin van der Vaart
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://www.evandervaart.nl/ Under construction


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.