1

at http://www.goodshow.tv I've got a problem with the nav. I have a class that puts an arrow image, which should line up with the right edge of the white border. Problem is, it bases the position on the left side of the text. Is there a more absolute way to position it?

4

2 に答える 2

5

あなたが何を意味しているのか正確にはわかりませんが、 <a> と .currentpage から背景を取り除き、次のものを <li> に置くと、おそらくあなたが望むものに近いものが得られます。そうでない場合は、あなたが望むものをもう一度述べてください:-)

background: transparent url(http://www.goodshow.tv/images/nav_arrow.png) no-repeat scroll 95% 50%

ただし、代わりに <li> でこれを行うと思います。

background: transparent url(http://www.goodshow.tv/images/nav_arrow.png) no-repeat scroll 100% 50%
padding:8px 20px 7px 0;

つまり、背景を右端に固定し、右のパディングを調整します。

垂直方向の配置のために、矢印のサイズまたはテキストの行の高さをいじることができます。私の目には、55% は垂直方向の 50% よりも良く見えます。この数値を調整するだけのハックかもしれないと思います。

于 2009-05-22T04:20:32.037 に答える
1

Graphainが推奨するようなオプションを使用します。ナビゲーション項目用のリストが 1 つと、矢印用のリストがもう 1 つあるようです。これらを組み合わせて、生活を少し楽にすることができます。:) アイデアは、li 要素の幅が矢印を表示するのに十分な幅であるということです。次に、これらのいずれかの背景を矢印を使用して現在のページの右側に配置するように設定します。そのようなことをするためにスタイル的に変更できるものは次のとおりです...

#nav { width:240px; } /* should go all the way to that vertical area where there arrows are) */
#nav li.currentpage { background:url(images/nav_arrow.png) no-repeat right center; } /* add the error */
#nav ul li { margin-right:30px; } /* will add a bit of spacing after each lit between the text and the arrow */

また、currentpage を a 要素から li 要素に変更する必要があります (さらに a.currentpage を変更して、より似たものを使用するようにします)。

#nav ul li.currentpage a {} /* your current a.currentpage style */

その後、矢印divをまとめて削除できるはずです。

于 2009-05-22T04:53:23.997 に答える