<style>
.circlleDiv {
width: 10em; height: 10em;
-webkit-border-radius: 5em; -moz-border-radius: 5em;
text-align: center; margin-top: 4.5em;
}
</style>
<div class="circle">
<?php echo subject; ?>
<br/>From
<?php echo from;?>
<br/>
<img height=100px width=100px src="<?php echo 'images/blue flower.jpg'; ?>"/>
</div>
makeing a picture a circle
Page 1 of 18 Replies - 2146 Views - Last Post: 02 March 2012 - 08:19 PM
#1
makeing a picture a circle
Posted 01 March 2012 - 10:14 PM
im trying to make my picture into a circle but it just stays a square
Replies To: makeing a picture a circle
#2
Re: makeing a picture a circle
Posted 01 March 2012 - 10:36 PM
Your style class name is "circlleDiv" where is the element with that class specified? You have a div named "circle" but no "circlleDiv"
#3
Re: makeing a picture a circle
Posted 01 March 2012 - 10:52 PM
still dosnt work but i fixed it
<style>
.circlediv {
width: 10em; height: 10em;
-webkit-border-radius: 5em; -moz-border-radius: 5em;
text-align: center; margin-top: 4.5em;
}
</style>
<div class="circlediv">
<?php echo subject; ?>
<br/>From
<?php echo from;?>
<br/>
<img height=1000px width=1000px src="<?php echo 'images/blue flower.jpg'; ?>"/>
</div>
#4
Re: makeing a picture a circle
Posted 01 March 2012 - 11:07 PM
which browser are you using?
#6
Re: makeing a picture a circle
Posted 01 March 2012 - 11:15 PM
dosnt work in IE either
#7
Re: makeing a picture a circle
Posted 02 March 2012 - 03:03 AM
You can't do that. Well not in the way you're trying to do it.
If you look at: http://jsfiddle.net/mYm5p/ it's applying the border radius to the div and not to the image.
Have a look at the following for workarounds:
http://stackoverflow...-crop-out-image
http://stick.gk2.sk/...ers-using-css3/
If you look at: http://jsfiddle.net/mYm5p/ it's applying the border radius to the div and not to the image.
Have a look at the following for workarounds:
http://stackoverflow...-crop-out-image
http://stick.gk2.sk/...ers-using-css3/
#8
Re: makeing a picture a circle
Posted 02 March 2012 - 01:29 PM
none of those seem to solve my problem, thanks though any other suggestions?
#9
Re: makeing a picture a circle
Posted 02 March 2012 - 08:19 PM
If you set your div to the width and height of 100px, use a border radius of 100px and you will have your circle.
BTW, it doesn't work in IE because IE does not use -moz or -webkit. You must use border-radius for IE.
BTW, it doesn't work in IE because IE does not use -moz or -webkit. You must use border-radius for IE.
This post has been edited by exiles.prx: 02 March 2012 - 08:20 PM
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote





|