/    Sign up×
Community /Pin to ProfileBookmark

Image with scroolbar without changing page size

Hi

I have page with 1 image which link to other image on the same page.

I am using Img DIV for that and its size is fix.(600*400)

the image which i want to display in that is bigger then the DIV size, and DIV is resize to image size.

how can i fix the div size and the image should remain same size and display scroll bar within div.

I tried
overflow: scroll;
but its not working.

Any idea/s
Thanks

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@holyhttpMay 22.2007 — Try

overflow:visible;
Copy linkTweet thisAlerts:
@ketan7880authorMay 22.2007 — it's not working

the page size is change to fit the image.
Copy linkTweet thisAlerts:
@holyhttpMay 22.2007 — If you do not want the DIV to resize you can then set:

overflow:hidden;

the excess part of the image will be then hidden.

For the image to remain the same size you should either have the image with th right dimensions or specify the width and height properties in the HTML code of the image.

I hope that naswers your question
Copy linkTweet thisAlerts:
@GauravKMay 29.2007 — Use

Overflow: scroll
Copy linkTweet thisAlerts:
@WebJoelMay 29.2007 — OP said that overflow:scroll; wasn't working. ?

It should. Maybe OP will post the code so it can be examined. ?
Copy linkTweet thisAlerts:
@GauravKJun 01.2007 — div

{

width:150px;

height:150px;

overflow: auto;

white-space: nowrap;

}

white-space: nowrap is not necessary.
×

Success!

Help @ketan7880 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...