views:

409

answers:

3

I have some anchor elements, but they are in absolute position div and the content of the div is so large that it scrolls inside (overflow:auto).

All entries in the div have an anchor on top, but if I go to this anchor I have the element I wanted to directly on top of the side, but I want it in the center. I need something like an offset so I can jump higher than normal.

+1  A: 

You could try a Javascript scroll to correct the position.

Jeremy Stein
and how does this work?
Markus
Start here: http://radio.javaranch.com/pascarello/2005/12/14/1134573598403.html
Jeremy Stein
+2  A: 

you could always add another div to wrap around it, and then do something like

.wrapperdiv{
   position:relative;
   top:-10px;
}
Mikey
A: 

I had another problem. My anchor was an id of an item and the item id was an id of a text input too so the anchor jumped to the input instead of my suggestion. It would jump to the a element with the name=itemid.

Markus
You're more likely to get a better answer if you can describe your problem with screenshots and a mockup of what you want to do.
Mikey
ye next time sry
Markus
And use punctuation. It's hard to understand your questions. Doesn't take much to use capitals and a few dots and commas!
Matt Clarkson