1

I got this JavaScript tag which is displaying a banner on my page:

<script src="http://e2.emediate.se/eas?cu=10524;cre=mu;js=y" 
  language="JavaScript" type="text/javascript"></script>
<embed 
   height="150" 
   width="768" 
   type="application/x-shockwave-flash"
   src="http://e2.emediate.se/media.2/170/4045/32676/49312404-768-150.swf?clickTAG=http://e2.emediate.se/eas?camp=32676::cu=10524::no=60039::ty=ct"
>

I use PHP and XSLT.

The banner is showing all good, but it is also generating a invisible break. This is a problem because I got another small banner to the right. Which is pushed down because of the break.

Is this a weird XSLT-issue? Someone got any idea?

1
  • you'd have to tell us what the output of that script is - what does it do to the DOM? Commented Apr 24, 2009 at 11:20

3 Answers 3

1

what is the content of the banner? the script tag itself is invisible. you need to check the content of the banner itself and see what exactly is breaking. use FireBug to check the content after load and to see exactly what broke.

e: looking at the embed you posted- 2 things to check- 1st, imo- embed tags' display is block, so to you might have to set it inline/float it. 2nd- make sure that the width of the object is small enough to be contained with the other one inside their container. for both to be fixed, you probably gonna have to edit the script (at the very least, you will need to find a way to style the embed)

Sign up to request clarification or add additional context in comments.

Comments

0

You should post code of what HTML the javascript generates. But consider this:

 <script etc></script><div id='theOtherBanner'>sdf</div>

If the script would generate something like:

 <div id='firstBanner'>Bla</div>

Then the second banner will be pushed down because divs are block-level elements. You should make the divs display:inline; or float them. When floating make sure you clear the float using something like:

 <br style='clear:both'>

After the floated divs.

Comments

0

Yeah, wrap that up in a span:

<span id="myexternalbanner"?
  <script type="text/javascript" language="JavaScript" src="http://something.com" ></script>
</span>

Then style that. You'll most probably need to inspect the generated HTML with DOM Inspector or something like that, but this should work:

span#myexternalbanner *{
  display: inline;
}

Maybe you'll need to float to left, but that'll be trickier.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.