Create a circle in css | SoloLearn: Learn to code for FREE!

+13

Create a circle in css

I don’t know why this does not work: body { width: 50; height: 50; border-radius: 50% }

10/20/2020 10:30:46 PM

Algfish31

78 Answers

New Answer

+19

1. Body is the display of the main page of HTML5 web, which mean it can't be edited with any kind of shape.. You only can change it's size, color and every inheritance property 2. If you want to make a circle, try to make it with "div" block element or make it with "svg" element with "circle" or "ellipse" element inside it.. 3. Check your syntax bruhh..

+14

https://code.sololearn.com/W2A74SlMviMI/?ref=app

+11

Do the CSS tutorial.

+7

You can't create a circle with the body tag, you need to declare at least one div and call it as circle class then do this: .circle { width: 50; height: 50; border-radius: 100% }

+6

but now i can create my game ;)

+6

DACK:CHESS , stop advertising, or else you are in trouble!

+6

First => HTML create div <div></div> Second => CSS div{ width: 50px; height: 50px; border: 1px solid black; border-radius: 100%; } your div is create with circle

+5

Body is fixed and it cant be transferred into circle. Try making some block level elements like p or div and make them In a circular format

+5

FusionX please use proper family friendly environment language there are children on the platform. Please remove comment... Thanks and happy coding.

+4

Just begin with html and css. Then learn javascript if you want to learn. Start now. Don't spam here.

+4

Because you can't make a circle with the body. You have to declare a div and class than style it in css with proper syntax which you don't bother about I think. So please write the code with proper syntax. And also give the div a background which you have not given in your code.

+3

You should start learning html and css first complete those. Then create your code.

+2

You didn't write semicolon.

+2

Use <div> instead of <body>

+2

bro you forget to put the semicolon in last line

+2

//This is my CSS #circle { width: 90px; height: 90px; border-radius: 50%; background-color: red; } //This is my HTML <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h5>This is the cercle id</h5> <div id="circle"></div> </body> </html>

+1

sorry i ment to add a: background-color = green; after the height Desmond Ampomah

+1

What is the semicolon? Samira

+1

oh thanks

+1

fix https://code.sololearn.com/WeiS6Y6oCLnL/?ref=app