Part Three • Create a paragraph tag nested inside a div underneath the second card • In a few sentences explain why we experienced an overflow of content in the first card but not the second card. You must mention both elements that caused an overflow and include details about how the box model and box sizing property relate to this problem o Put this response inside the paragraph tag Use the appropriate classes to center the paragraph's parent div inside the body o Hint: use 2 classes from box-styles.css

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

<!DOCTYPE html>
<html lang="en">

below is box-styles.css
 <style>
 @import url('https://fonts.googleapis.com/css2?family=Rubik+Mono+One&display=swap');

body {
    font-size: 62.5%;
    margin: 0;
}

h1 {
font-size:4em;
text-align: center;
font-family: 'Rubik Mono One', sans-serif;
}

h3 {
font-size: 2em;
}

p {
font-size: 1.5em;
}

h3, p {
    margin:0;

}

.title-padding {
    padding: 5% 10%;

}

.body-padding {
    padding-left: inherit;
    padding-right: inherit;
    padding-top: 7%;

}

.light-shadow {
    box-shadow: transparent;
   

}

.max-width {
    max-width: 50em;
}

/* .full-width {

} */

.center-element {
    margin-top:8em;
    margin-left:inherit;
    margin-right: inherit;
    text-align: center;

}

.round-borders {
    border:1px solid black;
    border-radius: 0.25em;
    font-size: 2em;

}

.bb {
    box-sizing: content-box;
    width:100%;
    padding: inherit;
    margin: inherit;

}

.cb {
    box-sizing: content-box;

}
  </style>
above is the box-styles.css


<head>
    <meta charset="UTF-8">
    <title>Lab 9 (Week 10)</title>
    <style>
        @import url(./styles/box-styles.css);
        @import url(./styles/color-styles.css);
    </style>
</head>
<body>
        <h1>Box Model</h1>
        <div class="cb-container light-shadow center-element round-borders max-width">
            <div class="cb-title title-padding cb full-width">
                <h3>Content Box</h3>
            </div>
            <div class="cb-btm body-padding cb full-width">
                <p><code>content-box </code>gives you the default CSS box-sizing behavior. If you set an element's width to 100 pixels, then the element's content box will be 100 pixels wide, and the width of any border or padding will be added to the final rendered width, making the element wider than 100px</p>
            </div>
        </div>

        <div class="bb-container light-shadow center-element round-borders max-width">
            <div class="bb-title title-padding bb full-width">
                <h3>Border Box</h3>
            </div>
            <div class="bb-btm body-padding bb full-width">
            <p><code>border-box</code> tells the browser to account for any border and padding in the values you specify for an element's width and height. If you set an element's width to 100 pixels, that 100 pixels will include any border or padding you added, and the content box will shrink to absorb that extra width. </p>
            </div>
        </div>
</body>
</html>

Part Three
• Create a paragraph tag nested inside a div underneath the second card
• In a few sentences explain why we experienced an overflow of content in the first card
but not the second card. You must mention both elements that caused an overflow and
include details about how the box model and box sizing property relate to this problem
o Put this response inside the paragraph tag
• Use the appropriate classes to center the paragraph's parent div inside the body
o Hint: use 2 classes from box-styles.css
Transcribed Image Text:Part Three • Create a paragraph tag nested inside a div underneath the second card • In a few sentences explain why we experienced an overflow of content in the first card but not the second card. You must mention both elements that caused an overflow and include details about how the box model and box sizing property relate to this problem o Put this response inside the paragraph tag • Use the appropriate classes to center the paragraph's parent div inside the body o Hint: use 2 classes from box-styles.css
Expert Solution
Step 1

Answer:

Updated Source Code:

<!DOCTYPE html>
<html lang="en">

<!-- below is box-styles.css -->
<style>
    @import url('https://fonts.googleapis.com/css2?family=Rubik+Mono+One&display=swap');

    body {
        font-size: 62.5%;
        margin: 0;
    }

    h1 {
        font-size: 4em;
        text-align: center;
        font-family: 'Rubik Mono One', sans-serif;
    }

    h3 {
        font-size: 2em;
    }

    p {
        font-size: 1.5em;
    }

    h3,
    p {
        margin: 0;
    }

    .title-padding {
        padding: 5% 10%;

    }

    .body-padding {
        padding-left: inherit;
        padding-right: inherit;
        padding-top: 7%;
    }

    .light-shadow {
        box-shadow: transparent;
    }

    .max-width {
        max-width: 50em;
    }

    /* .full-width {

} */
    .center-element {
        margin-top: 8em;
        margin-left: inherit;
        margin-right: inherit;
        text-align: center;
    }

    .round-borders {
        border: 1px solid black;
        border-radius: 0.25em;
        font-size: 2em;
    }

    .bb {
        box-sizing: content-box;
        width: 100%;
        padding: inherit;
        margin: inherit;
    }

    .cb {
        box-sizing: content-box;
    }

    .cb-container {
        margin: auto;
    }

    .bb-container {
        margin: auto;
        margin-top: 50px;
    }

    .response {
        padding: 10px;
        font-size: 20px;
        width: 74%;
        height: 200px;
        margin: 50px auto;
        border: 1px solid black;
        border-radius: 5px;
        overflow-y: auto;
        overflow-x: hidden;
    }
</style>
<!-- above is box-styles.css -->

<head>
    <meta charset="UTF-8">
    <title>Lab 9 (Week 10)</title>
    <style>
        @import url(./styles/box-style.css);
        @import url(./styles/color-styles.css);
    </style>
</head>

<body>
    <h1>Box Model</h1>
    <div class="cb-container light-shadow center-element round-borders max-width">
        <div class="cb-title title-padding cb full-width">
            <h3>Content Box</h3>
        </div>
        <div class="cb-btm body-padding cb full-width">
            <p><code>content-box </code>gives you the default CSS box-sizing behavior. If you set an element's width to
                100 pixels, then the element's content box will be 100 pixels wide, and the width of any border or
                padding will be added to the final rendered width, making the element wider than 100px</p>
        </div>
    </div>

    <div class="bb-container light-shadow center-element round-borders max-width">
        <div class="bb-title title-padding bb full-width">
            <h3>Border Box</h3>
        </div>
        <div class="bb-btm body-padding bb full-width">
            <p><code>border-box</code> tells the browser to account for any border and padding in the values you specify
                for an element's width and height. If you set an element's width to 100 pixels, that 100 pixels will
                include any border or padding you added, and the content box will shrink to absorb that extra width.
            </p>
        </div>
    </div>

    <div class="response">
        <p>Because first card contain widhth and hight value is more than second card and may be words to high in first
            card and low words in second card. <br>
            overflow elements (overflow-x: auto), (overflow-y: auto) <br>
            "box model" is used design and layout. A box wraps around every HTML element in the CSS box model. Margin,
            borders, padding, and the actual content are all part of it. <br>
            The width and height of an element are determined using the box-sizing attribute, which specifies whether
            padding and borders should be included or not.

        </p>
    </div>
</body>

</html>

 

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY