SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fixed slideshow using css

    I want to know is it possible to display slideshow in a fixed col and images should not scroll with the text or other contents in col2 of the webpage.

    Thanks

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Of course

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,387
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You can use position:fixed to keep an element fixed in the viewport while other content scrolls but is generally only useful for small headers or footers or a small sidebar. The reason for this is that once a fixed element sticks out of the viewport it is unreachable as viewport scrollbars do not scroll a fixed element (because it is fixed).

  4. #4
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Unless you say right whatever. Then it will move left with the window

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,387
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by EricWatson View Post
    Unless you say right whatever. Then it will move left with the window
    And obscure the content when the text wraps

    You can say left:0 right:0 but you would need to ensure that overflow:auto is also set for the fixed element but then starts to look a little messy. You can also topxpx and bottom xxpx but once again overflow would need to be set to auto.

    Fixed elements are best at fixed widths and in small doses. I've been working with a fixed header for the last few months and its a real pain as its in a fluid site and when the text wraps it obscures the content so I've had to set a number of media queries to move the content away from the header at widths that its likely to wrap which of course doesn't help with text re-size. I've had to use a script to monitor the headers height and when it increases or decreases then I change the padding on the content underneath. Lastly when the header is too narrow for its content another media query switches it back to non fixed. All in all its a real pain although it looks nice.

  6. #6
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Oh. I didn't look. Just made a general statement. The site I'm doing now is all fixed. Very tricky I'm finding.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •