Go Back   Forum Care Forums > Development Reference Area > Webmaster Topics

Reply
 
LinkBack Thread Tools Display Modes
center a scrolling image/div via CSS: is it possible?
Old
  (#1)
Fagiolino
Guest
 
Posts: n/a
Default center a scrolling image/div via CSS: is it possible? - 05-14-2007, 12:12 AM

I have a div, with heigth: 300px and width: 600px, which contains an
image which is four times large: heigth 1200px and width 2400px.
I have set overflow: auto to make the image scrolling.

But I am not able to to this thing: when I open the page, I want that
the image in the div appears centered, and not that the left top border
is displayed. In other words, I want that the pointers in the
horizontal and vertical scrolling bars start being in the middle and
not at the begin.

I have tried using position: absolute and setting top and left, but I
have not obtained my hoped result: the image is centered, but then I
anymore cannot scroll it to the top and to the left.

Is there a method to do such a task without using javascript? Thanks.

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top