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')
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:
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.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images