Page 1 of 1

Mingling CSS3 into PHP - why does IE9 fail to curve the edge

Posted: Mon May 16, 2011 8:30 am
by simonmlewis
Here is my code.
The bit to look at is the "-moz-border-radius: 15px;" area.
It makes the corner turn into a curve in Firefox, but in IE9 it won't.

Code: Select all

if ($cookietype == "admin")
{
$id=$_GET['id'];
$edit=$_GET['edit'];
$comment=$_POST['comment'];
  if ($edit == "y")
  { 
  if ($comment != NULL) { mysql_query ("UPDATE usercomments SET comments = '$comment' WHERE id = '$id'");
  }

echo " 
<a name='comment'></a><br/>
<div style='-moz-border-radius: 15px;
border-radius: 15px;
padding: 5px;
background-color:#00FF00'>";
if ($comment == NULL)
{
$result = mysql_query ("SELECT * FROM usercomments WHERE id = '$id'");
while ($row = mysql_fetch_object($result))
      { echo "
<form method='post' action='index.php?page=home&edit=y&id=$id#comment'>
Comment made:<br/>
<textarea name='comment' style='width: 650px; height: 50px'>$row->comments</textarea><br/><br/>
<input type='submit' value='Update'>
</form>";
      } mysql_free_result($result);
      }
      echo "</div>";
}
}
If I use this in IE9 it works:

Code: Select all

<style>
.test {
-moz-border-radius: 15px;
border-radius: 15px;
padding: 5px;
background-color:#00FF00
} 
</style>
</head>

<body>
<div class='test'>
This is a test
<form method='post' action='#'>
<textarea name='ddd'></textarea>
<input type="submit" value="submit" />
</form>
</div>
If I put this same code into my PHP code, IT FAILS!

What the heck is it that stops it working?

Re: Mingling CSS3 into PHP - why does IE9 fail to curve the

Posted: Mon May 16, 2011 9:32 am
by Gopesh
Hi,-moz-border-radius will work only on mozilla firefox and Netscape navigator but not in ie browsers..so it is better to use curvy corners http://www.curvycorners.net/.

Re: Mingling CSS3 into PHP - why does IE9 fail to curve the

Posted: Mon May 16, 2011 10:10 am
by thiscatis
or use CSS3 Pie:

http://css3pie.com/

Re: Mingling CSS3 into PHP - why does IE9 fail to curve the

Posted: Thu Jun 23, 2011 6:51 am
by simonmlewis
I would, but in IE it causes problems.
Firefox loves it.
IE either gets an empty DIV, or it errors o the 'header' code when you put it in the Includes file being displayed.