I am having an issue I am not sure what error I have with this code when I execute it. Here are the instructions for the code: Column Styles Next, you’ll format the grid columns. Go to the Column Styles section. Create a style rule to float all div elements whose class value starts with “col-” on the left margin. Set the padding around all such elements to 2%. Finally, apply the Border Box Sizing model to the content of those elements. (Note: Remember to use web extensions to provide support for older browsers.) In the same section, create style rules for div elements with class names .col-1-1, .col-1-2, .col-1-3, .col-2-3, .col-1-4, and .col-3-4 to set their widths to 100%, 50%, 33.33%, 66.67%, 25%, and 75% respectively.   Here is my code: div[class^="col-"]{   float:left;   padding: 2%;   -webkit-box-sizing: border-box;   -moz-box-sizing: border-box;   box-sizing: border-box; } div.col-1-1 {width: 100%;} div.col-1-2 {width: 50%;} div.col-1-3 {width: 33.33%;} div.col-2-3 {width: 66.67%;} div.col-1-4 {width: 25%;} div.col-3-4 {width: 75%;}   And this is the error I am getting: Simulation Output73.15625px Traceback (most recent call last): File "nt-test-9c78cce5.py", line 10, in assert('133.' in elm.value_of_css_property('width')) AssertionError   Test Contentsfrom selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.PhantomJS() driver.get('{{localhost}}/pc_specials.html') driver.implicitly_wait(1) elm = driver.find_element_by_css_selector('div.col-1-3')

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

I am having an issue I am not sure what error I have with this code when I execute it.

Here are the instructions for the code:

Column Styles

Next, you’ll format the grid columns. Go to the Column Styles section. Create a style rule to float all div elements whose class value starts with “col-” on the left margin. Set the padding around all such elements to 2%. Finally, apply the Border Box Sizing model to the content of those elements.
(Note: Remember to use web extensions to provide support for older browsers.)

In the same section, create style rules for div elements with class names .col-1-1, .col-1-2, .col-1-3, .col-2-3, .col-1-4, and .col-3-4 to set their widths to 100%, 50%, 33.33%, 66.67%, 25%, and 75% respectively.

 

Here is my code:

div[class^="col-"]{
  float:left;
  padding: 2%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

div.col-1-1 {width: 100%;}
div.col-1-2 {width: 50%;}
div.col-1-3 {width: 33.33%;}
div.col-2-3 {width: 66.67%;}
div.col-1-4 {width: 25%;}
div.col-3-4 {width: 75%;}
 

And this is the error I am getting:

Simulation Output73.15625px Traceback (most recent call last): File "nt-test-9c78cce5.py", line 10, in <module> assert('133.' in elm.value_of_css_property('width')) AssertionError

 

Test Contentsfrom selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.PhantomJS() driver.get('{{localhost}}/pc_specials.html') driver.implicitly_wait(1) elm = driver.find_element_by_css_selector('div.col-1-3') print(elm.value_of_css_property('width')) assert('133.' in elm.value_of_css_property('width')) driver.close()

I am not sure what this error means and why I am getting it. Any help would be appreciated. Thanks.

Checks
Browser Simulation Incomplete
CSS Styles | Column Styles
Simulation Output Ⓒ
79.375px
Traceback (most recent call last):
File "nt-test-613c675c.py", line 10, in <module>
assert ('133. in elm.value_of_css_property( 'width'))
AssertionError
Test Contents
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.PhantomJS()
driver.get('{{localhost}}/pc_specials.html')
driver.implicitly_wait (1)
elm = driver.find_element_by_css_selector('div.col-1-3¹)
print (elm.value_of_css_property('width'))
assert (¹133. in elm.value_of_css_property('width'))
driver.close()
Transcribed Image Text:Checks Browser Simulation Incomplete CSS Styles | Column Styles Simulation Output Ⓒ 79.375px Traceback (most recent call last): File "nt-test-613c675c.py", line 10, in <module> assert ('133. in elm.value_of_css_property( 'width')) AssertionError Test Contents from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.PhantomJS() driver.get('{{localhost}}/pc_specials.html') driver.implicitly_wait (1) elm = driver.find_element_by_css_selector('div.col-1-3¹) print (elm.value_of_css_property('width')) assert (¹133. in elm.value_of_css_property('width')) driver.close()
Expert Solution
trending now

Trending now

This is a popular solution!

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