jQuery/JavaScript issue

Soldato
Joined
4 Jan 2004
Posts
7,774
Location
Nottingham
Hey Guys

I have a small issue with a webpage I'm creating.

I have a few div boxes setup on the page that have <?php include("page.php"); ?> tags in them to load info into the div. This work's great and no problems.

The issue comes from me wanting rounded corners on the div boxes. I'm using the code from Nifty Corners to generate rounded corners without the need to have corner images positioned using CSS on each corner. I'm using they're JavaScript version to keep the page a bit cleaner. The rounded corners work fine on the div boxes like this:

PHP:
<div id="box1">
 <p>hello world</p>
</div>
but it doesn't work on div boxes set out with the code below. Instead it looks like it's just adding the corners to what is essentially an empty div box then adding the content from the php page in after?

PHP:
<div id="box2">
 <?php include("page.php"); ?>
</div>

If I add a simple <a>&nbsp;</a> into the div box then it works fine but I get a bit of extra height in the div which I don't want.

I've tried both window.onload=function(){ and $(document).ready(function(){ but they basically do the same thing

Does anyone know a way round this?

Cheers
 
Last edited:
yeah, the only bit I've actually changed is the call to the function for rounded corners. all the content is the same.

the include file just has a simple <ul> in it, nothing special but I guess the fact it was in an include could have been causing nifty corners to break?
 
Back
Top Bottom