What is wrong with my code?

i feel as if i have done everything right but it still is giving me an error:
Oops, try again. Did you remember to set your link’s text-decoration to none;?

img {
display: block;
height: 100px;
width: 300px;
margin: auto;
}

p {
text-align: center;
font-family: Garamond, serif;
font-size: 18px;
}
/Start adding your CSS below!/
div {
height: 50px;
width: 120px;
border-color: #6495ED;
background color: #BCD2EE;
border-radius: 5px;
margin: auto;
text-align: center;
text-decoration: none;
}

You have set the entire div's text-decoration to none instead of specifically the link. To specify the link only, you need to change div { to div a{.

Hope that works!

1 Like

Thnx could u pls tell me the reasoning for that.
Btw, how do u make specific characters stand out in CSS that are in different locations of the webpage?

Sure.

When your CSS was div {......text-decoration: none;}, it was selecting the entire div, which is not what the lesson wants. What the lesson wants is for you to select the link which is in the div. In HTML , links made using anchor tags, like this: <a href="#">link text</a>, and so we select the tag, <a> , which is inside the divider, <div>, by doing div a {....}. By putting the ‘a’ after the ‘div’ we are saying that we want to select only the links which are inside the divider.

What do you mean by this? (Below)

1 Like

@jibblyj, so close. You should actually add a new css selector (a or div a), a few of the property’s inside div, should stay to div, if you change div to div a you ruin your button

tray this

def cube(number):
return number**3
def by_three(number):
if number % 3 == 0:
return cube(number)
else:
return False
number = int(raw_input(“Enter number”))
print by_three(number)

it looks like you have the wrong forum, this html + css. and too me, that looks like python code

And that code is completely irrelevant to the topic…

But I was sooo close!

i flagged it as off-topic, hope that helps. Yea, you where so close.

1 Like

yeah sorry this is javascript
i only just found out itn was the wrong forum STRAIGHT after i posted it
thnx for help though