Alright, I have a a page with an ajax button on it. When you hit the ajax button, it throws an embed object into the 'data' div. Everything works fine, my problem is that the embed is creating a scrollbar that I don't want. Any ideas on how to prevent the scrollbar? I've already tried throwing 'overflow: hidden' everywhere I could with no success =/
~html~
http://pastebin.com/WZ2YzDVb
~my.css~
http://pastebin.com/iR335BNj
~ajax embed data~
<embed width=100% height=100% type='text/html' style='overflow: hidden' src='source'>
I used pastebin to keep my post clean.
When you see the scroll bar in an element, you are actually seeing the scroll bar for that element's webpage. You can't fix it my giving the <embed>
a style, you have to give the <body>
of the <embed>
a style. Here's what solved it for me:
[MainFile.html]
<html>
<body>
<embed style='border:1px solid black;' src='EmebdedFile.html'></embed>
</body>
</html>
[EmbededFile.html]
<html>
<body style='overflow:hidden'>
<img src='smile.png' style='height:1000px; width:1000px;'></img>
</body>
</html>
Notice that 'overflow:hidden' is in the HTML file of the embedded element.
Use your embed tag inside a container with overflow hidden. Then set the width of the embed with 100% + 17px (the default width of a scrollbar).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With