Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10

Thread: Image position

  1. #1
    Junior Member
    Join Date
    Sep 2005
    Posts
    6
    Member #
    11291
    I want to have an image that takes up the whole screen, but I don't want it to resize with the window or have someone be able to scroll up or down.

    _____________
    1...........1
    1...........1
    1....[X]....1
    1...........1
    1___________1

    ^ i want the image to stay right in the middle no matter what someone does to the window. If someone makes the window smaller than the image I want it to go off the screen without someone being able to scroll and see all of it, but I want the image to always stay centered... Kinda hard to explain, but can someone help me do this? - Adam

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Hm, so always keep an image in the centre?

    See attached file.

    You will have to change the src of the <img> tag, as well as width/height.

    When the user resizes the window the image will be in the middle of the screen.

    Hope this helps

  4. #3
    Junior Member
    Join Date
    Sep 2005
    Posts
    6
    Member #
    11291
    Almost, but when the window gets smaller than the picture, I don't want any scroll bars and I always want to see the center of the photo. I've tried everything I know to do and have gotten close, but I can't get it quite right.

  5. #4
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Can I ask in what context this is being used?

    ie. what is the purpose of this behaviour?

    Sean

  6. #5
    Junior Member
    Join Date
    Sep 2005
    Posts
    6
    Member #
    11291
    yes, I'm making a website for my portfolio and i would like for the pages to be that way. No matter what size anyone has there window... as long as it is a reasonable size, they will have all the links and such in the middle, and the background picture will just continue, but be centered on the page. Real reason: because its just how I would like it. No real reason besides personal preference.

  7. #6
    Junior Member
    Join Date
    Sep 2005
    Posts
    6
    Member #
    11291
    I found a website that had it and coppied this from it and it seems to work just fine. Thanks alot guys. - Adam

    <STYLE type=text/css>BODY {
    BACKGROUND: url(http://address.whatever) #000000 fixed no-repeat center center
    }
    </STYLE>

  8. #7
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    You posted that whilst I was working on an example...

    That still won't centre your links etc... so I'll post the URL anyway...

    Something like http://www.seanmiller.net/t800/ ?

    Sean

  9. #8
    Junior Member
    Join Date
    Sep 2005
    Posts
    6
    Member #
    11291
    Thanks alot, thats what I need for my pages, but is there any way i can make the entire page clickable for a link, ie: the intro page?

  10. #9
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Yes. you can use the onClick event in your <body> tag.

    Code:
    <body onClick="javascript:window.location = 'http://domain.com'";>

  11. #10
    Junior Member
    Join Date
    Sep 2005
    Posts
    6
    Member #
    11291
    Thanks alot guys, I think I got it from here.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:55 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com