New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 10CP1
Program Plan Intro
To create a style rule that sets the font size to 0.9 cm and horizontally centered on the page. Also set the top and bottom padding to 10 pixels.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
cSS code:
4. Code a style rule for the main element that puts padding around its contents. Then, code a style rule for the footer that puts a blue border above it. Note that this border doesn’t touch the border for the body. 5. Code style rules for the h1, h2, and h3 elements. The h1 font should be 150% of the default specified in the body, the h2 font should be 125% of the default font, and the h3 font should be 115% of the default font. The h1 font should also be blue. Then, apply appropriate margins or padding to the h1, h2, and h3 elements so the spacing before and after the headings is similar to what’s shown above.6. Code the style rules for the <p>, blockquote, ul, and li elements so the spacing before and after the elements is similar to what’s shown above.7. Code a style rule for the cite element that changes its color to blue and removes the italics from the text.8. Code a style rule for the paragraphs that contain cite elements. This style rule should right align the paragraphs…
1. Create a style rule for anchor elements within the main element that sets the font color value to #47476b, removes the underline, sets a font-weight value of bold, and sets a font style value of italic.
Adjust the width value for the cssl, css2, and css3 id selectors so that they appear next to each other horizontally.
2. Update the style rule for the footer selector to clear a float on the left.
STYLES.CSS code
#css1, #css2, #css3
{
width: 40%;
float: left;
padding: 0 1%;
}
footer
{
text-align: center;
font-size: 0.85em;
color: #47476b;
padding: 1% 0;
border-top: 3px solid #47476b;
}
body
{
padding 2%;
background-color: #d1d1e0;
}
main
{
padding: 2%;
font-family: Geneva, Arial, sans-serif;
}
header h1
{
text-align: center;
font-size: 3em;
font-family: Georgia, Times, serif;
padding: 3%;
color: #47476b;
}
nav
{
background-color: #47476b;
}
nav ul
{
margin: 0;
}
nav li
{
display: inline-block;…
Chapter 2 Solutions
New Perspectives on HTML5, CSS3, and JavaScript
Ch. 2.1 - Prob. 1QCCh. 2.1 - Prob. 2QCCh. 2.1 - Prob. 3QCCh. 2.1 - Prob. 4QCCh. 2.1 - Prob. 5QCCh. 2.1 - Prob. 6QCCh. 2.1 - Prob. 7QCCh. 2.1 - Prob. 8QCCh. 2.2 - Prob. 1QCCh. 2.2 - Prob. 2QC
Ch. 2.2 - Prob. 3QCCh. 2.2 - Prob. 4QCCh. 2.2 - Prob. 5QCCh. 2.2 - Prob. 6QCCh. 2.2 - Prob. 7QCCh. 2.2 - Prob. 8QCCh. 2.3 - Prob. 1QCCh. 2.3 - Prob. 2QCCh. 2.3 - Prob. 3QCCh. 2.3 - Prob. 4QCCh. 2.3 - Prob. 5QCCh. 2.3 - Describe the item selected by the following...Ch. 2.3 - Prob. 7QCCh. 2.3 - Prob. 8QCCh. 2.3 - Prob. 9QCCh. 2 - Prob. 1RACh. 2 - Prob. 2RACh. 2 - Prob. 3RACh. 2 - Prob. 4RACh. 2 - Prob. 5RACh. 2 - Prob. 6RACh. 2 - Prob. 7RACh. 2 - Prob. 8RACh. 2 - Prob. 9RACh. 2 - Prob. 10RACh. 2 - Prob. 11RACh. 2 - Prob. 12RACh. 2 - Prob. 13RACh. 2 - Prob. 14RACh. 2 - Prob. 15RACh. 2 - Prob. 16RACh. 2 - Prob. 17RACh. 2 - Prob. 18RACh. 2 - Prob. 19RACh. 2 - Prob. 20RACh. 2 - Prob. 1CP1Ch. 2 - Prob. 2CP1Ch. 2 - Prob. 3CP1Ch. 2 - Prob. 4CP1Ch. 2 - Prob. 5CP1Ch. 2 - Prob. 6CP1Ch. 2 - Prob. 7CP1Ch. 2 - Prob. 8CP1Ch. 2 - Prob. 9CP1Ch. 2 - Prob. 10CP1Ch. 2 - Prob. 11CP1Ch. 2 - Prob. 12CP1Ch. 2 - Prob. 13CP1Ch. 2 - Prob. 14CP1Ch. 2 - Prob. 15CP1Ch. 2 - Prob. 16CP1Ch. 2 - Prob. 17CP1Ch. 2 - Prob. 18CP1Ch. 2 - Prob. 19CP1Ch. 2 - Prob. 1CP2Ch. 2 - Prob. 2CP2Ch. 2 - Prob. 3CP2Ch. 2 - Prob. 4CP2Ch. 2 - Prob. 5CP2Ch. 2 - Prob. 6CP2Ch. 2 - Prob. 7CP2Ch. 2 - Prob. 8CP2Ch. 2 - Prob. 9CP2Ch. 2 - Prob. 10CP2Ch. 2 - Prob. 11CP2Ch. 2 - Prob. 12CP2Ch. 2 - Prob. 13CP2Ch. 2 - Prob. 14CP2Ch. 2 - Prob. 15CP2Ch. 2 - Prob. 16CP2Ch. 2 - Prob. 17CP2Ch. 2 - Prob. 18CP2Ch. 2 - Prob. 19CP2Ch. 2 - Prob. 20CP2Ch. 2 - Prob. 21CP2Ch. 2 - Prob. 1CP3Ch. 2 - Prob. 2CP3Ch. 2 - Prob. 3CP3Ch. 2 - Prob. 4CP3Ch. 2 - Prob. 5CP3Ch. 2 - Prob. 6CP3Ch. 2 - Prob. 7CP3Ch. 2 - Prob. 8CP3Ch. 2 - Prob. 9CP3Ch. 2 - Prob. 10CP3Ch. 2 - Prob. 11CP3Ch. 2 - Prob. 12CP3Ch. 2 - Prob. 13CP3Ch. 2 - Prob. 14CP3Ch. 2 - Prob. 15CP3Ch. 2 - Prob. 16CP3Ch. 2 - Prob. 17CP3Ch. 2 - Prob. 18CP3Ch. 2 - Prob. 19CP3Ch. 2 - Prob. 20CP3Ch. 2 - Prob. 21CP3Ch. 2 - Prob. 22CP3Ch. 2 - Prob. 23CP3Ch. 2 - Prob. 24CP3Ch. 2 - Prob. 25CP3Ch. 2 - Prob. 26CP3Ch. 2 - Prob. 27CP3Ch. 2 - Prob. 28CP3Ch. 2 - Prob. 29CP3Ch. 2 - Prob. 30CP3Ch. 2 - Prob. 1CP4Ch. 2 - Prob. 2CP4Ch. 2 - Prob. 3CP4Ch. 2 - Prob. 4CP4Ch. 2 - Prob. 5CP4
Knowledge Booster
Similar questions
- Create a style rule for the section element with the id "sub" that displays that element as a grid consisting of three columns of equal width by repeating the column width 1fr three times.arrow_forwardTablet Element Styles The page body has four children: the header, the footer, the article element, and the aside element. The article and aside elements will share a row with more space given to the article element. Set the growth, shrink, and basis values of the article element to 2, 1, and 400 pixels. Set those same values for the aside element to 1, 2, and 200 pixels.arrow_forwardHelp me complete this task. Add the following style rules for the form elements. Create a style rule for the fieldset and input elements that sets the bottom margin to 2%. Create a style rule for the fieldset legend that sets the font-size to 1.25em and makes the font bold. Create a style rule for the label that sets the display to block and sets padding-top to 3%. Create a style rule for the btn class selector that removes the border, sets the top and bottom margin to zero and the left and right margin to auto, sets the display to a block, sets the padding to 5%, sets the background-color to 003399, sets the font-size to 1.25em, sets the border-radius to 10px, and sets the color to white (fff). --my css /* Style for body specifies a background color */ body { background: linear-gradient(to top right, #fff 0%, #6699ff 100%) no-repeat fixed center; font-family: Geneva, Arial, sans-serif; } /* Style for the container element */ #container { width: 90%; margin: 0 auto; }…arrow_forward
- Open the code4-2_grad.css file. Create a style rule for the article element that adds a black inset box shadow with a horizontal and vertical offset of 0 pixels, a blur radius of 50 pixels and a size of 20 pixels.arrow_forwardCSS question Add another div element to the web form containing the following code: Insert an input element to create an option button for the orderType field with the ID delivery. Make the option button checked by default. After the option button, insert a label associated with the delivery control containing the text Delivery. Add an input element to create a second option button for the orderType field with the ID pickup, followed by a label associated with the pickup control containing the text Pickup.arrow_forwardInstructions: Perform the following tasks: 1. Open the styles.css file in your text editor. Below the last style rule, add a comment with the text, Media Query for Tablet Viewport. 2. Below the comment, add a media query that targets a screen with a minimum width of 620px and print. 3. Add the following comments to the tablet media query: a. Tablet Viewport: Show tab-desk class, hide mobile class b. Tablet Viewport: Style rules for nav area 4. Add the following style rules below the Show tab-desk class, hide mobile class comment: a. Style rule for the tab-desk class selector that sets the display to a block. b. Style rule for the mobile class selector that sets the display to none. 5. Add the following style rules below the style rules for nav area comment: a. Style rule for the nav li selector that removes the top border, sets the display to an inline- block, and sets the font size to 1.25 em. b. Style rule for the nav li a selector that sets the padding to 0.5em. 6. In the…arrow_forward
- The table displays the five countries that earned the most medals in the 2022 Winter Olympics in Beijing. Hovering the mouse over the text on the expected webpage's top row makes the text orange. Add a new rule using the tr:nth-child(even) selector that makes every even tr child element have a lavender background color. Add a new rule using the th:hover selector that changes the th element's text color to orange when the mouse hovers over the element. <table> <caption>2022 Olympic Medal Counts</caption> <tr> <th>Country</th> <th>Gold</th> <th>Silver</th> <th>Bronze</th> <th>Total</th> </tr> <tr> <td>Norway</td> <td>16</td> <td>8</td> <td>13</td> <td>37</td> </tr> <tr> <td>ROC</td> <td>6</td>…arrow_forwardQUESTION: Navigation Lists Next, you’ll format the appearance of navigation lists on the page. Go to the Navigation Styles section and create a style rule for the nav a selector that displays the hypertext links using the font stack: Trebuchet MS, Helvetica, sans-serif. Set the top and bottom padding to 10 pixels. For every unvisited and previously visited hypertext link within a nav element, set the text color to white, remove underlining from the link text, and set the background color to the semi-transparent value hsla(0, 0%, 42%, 0.4). For every active or hovered link in a nav element, set the text color to the semi-transparent value hsla(0, 0%, 100%, 0.7) and set the background color to the semi-transparent value hsla(0, 0%, 42%, 0.7). CODE BELOW: @charset "UTF-8"; @font-face { font-family: Champagne; src: url("cac_champagne.woff") format("woff"), url("cac_champagne.ttf") format("truetype"); } @font-face { font-family: Grunge; src: url("1942.woff")…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage