0

My previous question.

Not exactely sure how to word this. How do you change the screen position of a select option on a pc screen (not concerned with mobile or other screens right now) The idea is that when you use the option select the target will stop a way down the screen. Right now it jumps straight to the top, effectively getting hidden under the header.

This is currently what i am using. Even if i could make it stop like 40px down the page would be great, and not have it ending up hidden under the heading.

Thanks a stack.

<h1>The Header Goes Here</h1>
<p id="2007"> FILMS 2007</p>
<p>A bunch of info goes here</p>
<p id="2008"> FILMS 2008</p>
<p>A bunch of info goes here</p>
<p id="2009"> FILMS 2009</p>
<p>A bunch of info goes here that eventually runs off the bottom of the screen</p>


<select onchange="location =this.options[this.selectedIndex].value;">
<option value = #select>Select Year</option>
<option value = #2007>2007</option>
<option value = #2008>2008</option>
<option value = #2009>2009</option>
</select>

I got this in response.

This question already has answers here:

offsetting an html anchor to adjust for fixed header [duplicate] (28 answers)
Fixed page header overlaps in-page anchors (36 answers)

These are great CSS resolutions for addressing repositioning anchor tags however I fail to see how this addresses my problem.

I tried the various solution offered in those answers and none of them worked, when I clicked on the option nothing happens. I removed the jquery code and replaced it with the CSS options. Nothing happened. When I replace the jquery back the selection option works again but with the same results. It still gets hidden behind the header.

Do you perhaps have another solution?

freedomn-m
  • 27,664
  • 8
  • 35
  • 57
Ray
  • 45
  • 3

0 Answers0