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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

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

Post 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?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Gopesh
Forum Contributor
Posts: 143
Joined: Fri Dec 24, 2010 12:48 am
Location: India

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

Post 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/.
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

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

Post by thiscatis »

or use CSS3 Pie:

http://css3pie.com/
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

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

Post 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.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply