Problem with Positioning


#1


https://www.codecademy.com/courses/learn-html-css/lessons/layout/exercises/position-relative?action=lesson_resume&link_content_target=interstitial_lesson


In the second exercise it indicates to add 240px on the top of a div.class that is non existent, I create it and still marks the answer wrong.


.question {
  top: 240px;
  margin: 120px auto;
  position: relative;
  text-align: center;
}

/* other option applied without success */
div.question {
  top: 240px;
  position: relative;
}


#2

The SCT may expect all the style properties to be in the one selector rule, .question.

In fact it does exist. The author may have wanted to bring our attention to the HTML,

<div class="question">

so we would see what element is affected by that ruleset.


#3

I am so sorry, but I still can't get it right. I am doing what it requires me to do, but can't advance onto the next exercise.

It wants me to add "position: relative;" for .question. After I succeed, it wants me to "add 240 pixels in the top of div.question (again, in style.css)". I add the 240px; as follows "top: 240px;" and still can't advance.

Again, sorry for taking your time on this simple issue


#4

So whatever properties you have in,

.question {

}

just add those two.


#5

Yeah I've already done that and still shows me the error. I think I am gonna report it as a bug.

Thanks.


#6

Be sure to try a refresh and Run again, before letting this go. Sorry I couldn't be more help.


#7

Here is a capture of the exercise. It is my first time having trouble, so I do not know if I'll get a reply from the bug I reported.


#8

You may not get a reply. The bug report just moves up the chain to the dev team. Before you leave it, try with a different browser. It would be nice if you could move on.


#9

Thank you very much!! You got it. Problem solved.


#10

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.