June 17, 200818 yr Hi again,i wish to create a div that looks like an iframe but isnt i would like the vertical scroll but not horizontal like a JavaScript pop up but only with CSS is this possible thank you
June 17, 200818 yr You could set the height of the div to say 200px and add overflow:auto; to your css. Any content that doesn't fit inside the div will force a scrollbar. Or you could force a scrollbar no matter how much content there is by using overflow:scroll; but this isn't very user friendly. To restrict the scrollbar to the vertical you would use overflow-y:auto; or overflow-y:scroll; Hope that helps
June 17, 200818 yr Yup - you can achieve this using CSS. However, I suggest you turn away from anything even remotely related to an iframe unless it is absolutely necessary.
June 17, 200818 yr Author Thank you its for a guest book for a website where customers can leave a comment about the products they have bought but if the site gets a lot of comments it could start looking a mess so thought about an iframe but didnt wish to use it thank you
July 10, 200818 yr Author Why isn't it a smart idea to use Iframes? I Think it can mess with the SEO of the site may be other reasons as well
Create an account or sign in to comment