Many thanks, you pointed me out the right way. In fact it was adding ":target::before" instead of ":target" that solved my problem. Instead of handling the position of target, this will add content block before the target output. So it's more easier to adjust the height and get the output in the right place. Have a nice day!