Div not showing

I want to make my friend’s website, I want to make buttons and the div im using is not showing. What am I doing wrong?

This is the code.

.box {
  border-radius: 15px;
  background-color: #2650ff;
<div class='box'></div>

PS : Fixed


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

.box {
  border-radius: 15px;
  background-color: #2650ff;
  height: 100px;  /* or whatever you want the height set at */

it seems you have nothing in the Div container. If the div is empty, the height collapses and is not viewable. simply place text, icon, img, or button within the div and that item will become visible. If you want it to remain empty, just set a static height for the div in the css.

Method 2

Your div is empty please add text to div and style to your button.

.box {
 border-radius: 15px;
 border: none;
 color: white;
 padding: 15px 32px;
 text-align: center;
 text-decoration: none;
 display: inline-block;
 font-size: 16px;
 margin: 4px 2px;
 cursor: pointer;
<!DOCTYPE html>


<div class='box'>content text</div>


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x