BlindingDawn
BlindingDawn

Reputation: 274

Removing scrollbar from <object> Embed

Currently I am using object to embed a adsense ad in a webpage

<object data="frontpage_blogrool_center_top_728x90" type="text/html" width="732" height="95" ></object>

I made the object larger than the original so that the scrollbar will not appear on the webpage but it still appears in IE8. Is there anyway to remove it?

Upvotes: 7

Views: 70270

Answers (5)

intika
intika

Reputation: 9712

Can be achieved with

display: flex;

Upvotes: -2

Joneskind
Joneskind

Reputation: 1

I solved my similar problem (embedding a complex SVG with all his JS and style stuff) just by adding a position: fixed to the body tag of the HTML content I wanted to embed. Though I can use a width:100% to keep my dimensions everywhere.

Upvotes: 0

Dirk Jan
Dirk Jan

Reputation: 2469

Give the <object> a min-height: 101% or more!

Example:

object {
  min-width: 100%;
  min-height: 101%; //not 100% but more than 101
}

Upvotes: 3

user142162
user142162

Reputation:

Add style="overflow:hidden; width: 732px; height: 95px" to the element:

<object data="frontpage_blogrool_center_top_728x90" 
        type="text/html" width="732" height="95"
        style="overflow:hidden; width: 732px; height: 95px"></object>

Upvotes: 5

You Garmendia
You Garmendia

Reputation: 79

You must add to the parent of the <object /> element's css, overflow: hidden;

Example:

<body style="overflow:hidden;">
    <object ...>
    </object>
</body>

Upvotes: 7

Related Questions