Vertically Fixed Position?

Posted on 2009-02-17
Last Modified: 2013-07-29
Is there a way to force an image to be vertically fixed but not horizontally?  I need this because i am creating a side scrolling web page and need an image to move up or down when a browser is re-sized.  If the position is fixed, the page does not scroll left or right so i just need it to be fixed vertically.  

Thanks in advance
Question by:Miles1317
    LVL 15

    Assisted Solution

    do u mean something like the following

    LVL 27

    Expert Comment

    by:Lukasz Chmielewski
    LVL 7

    Accepted Solution

    If you know the size of the image it is simple, First you need to get the size and halve it, I'll use 500x500px for example
    Make a div which will hold the image and position it like so
    CSS //
    <div class="image"> Place the image here </div>

    Ignore the background red, its just to see where abouts it ends up. You can add widths & heights if you want to but its not nessecary

    LVL 58

    Expert Comment

    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    The viewer will learn how to dynamically set the form action using jQuery.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now