Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

HTML & CSS Border ends not towards the end

Growlypw

New Coder
I was learning flexbox when I fell into problems that wasn't even part of course.



1)When it isn't full screen, the border doesn't wrap around the content but when full screen, it wraps around the content.



I did

.

Code:
container{display:flex;border: 10px solid goldenrod;height: 100%;flex-direction: row;

}

r/css - Border ends not towards the end




2) When I set flex-direction to column, it doesn't wrap around the content in both small and full screen.
CSS:
code for css



*{

    -moz-box-sizing: border-box;

     -webkit-box-sizing: border-box;

    

    box-sizing: border-box;

    margin: 0;

    padding: 0;

    

}













.box{

    color:rgb(31, 21, 21);

    font-size:100px;

    text-align: center;

    text-shadow: 4px 4px 0 rgba(0,0,0,0,1);

    padding:10px

    

}



.box1{background:blue;}

.box2{background: rgb(112, 22, 22);}

.box3{background: rgb(172, 138, 138);}

.box4{background: rgb(27, 27, 27);}

.box5{background: rgb(34, 255, 0);}

.box6{background: rgb(8, 0, 255);}

.box7{background: rgb(0, 255, 132);}

.box8{background: rgb(187, 0, 255);}

.box9{background: rgb(0, 255, 238);}

.box10{background: rgb(251, 255, 0);}





.container{

    display:flex;

    border: 10px solid goldenrod;

    height: 100%;

    flex-direction: row;

    

}
 
2) When I set flex-direction to column, it doesn't wrap around the content in both small and full screen.
CSS:
Code:
code for css



*{

    -moz-box-sizing: border-box;

     -webkit-box-sizing: border-box;

   

    box-sizing: border-box;

    margin: 0;

    padding: 0;

   

}













.box{

    color:rgb(31, 21, 21);

    font-size:100px;

    text-align: center;

    text-shadow: 4px 4px 0 rgba(0,0,0,0,1);

    padding:10px

   

}



.box1{background:blue;}

.box2{background: rgb(112, 22, 22);}

.box3{background: rgb(172, 138, 138);}

.box4{background: rgb(27, 27, 27);}

.box5{background: rgb(34, 255, 0);}

.box6{background: rgb(8, 0, 255);}

.box7{background: rgb(0, 255, 132);}

.box8{background: rgb(187, 0, 255);}

.box9{background: rgb(0, 255, 238);}

.box10{background: rgb(251, 255, 0);}





.container{

    display:flex;

    border: 10px solid goldenrod;

    height: 100%;

    flex-direction: row;

   

}
In your CSS the flex-direction is row, not colomn.
 

Latest posts

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom