タグ

positionに関するseckieのブックマーク (2)

  • JavaScript - Find position

    See section 9G of the book. However, the script on this page is a newer version than the one in the book, and it's supposed to work better than the old one. On this page I give the necessary code to find out where an element is on the page. This script finds the real position, so if you resize the page and run the script again, it points to the correct new position of the element. offset In all br

  • floatとpositionの使い分け

    てんぽ: floatとpositionの使い分け CSSHTML、FC2ブログのカスタマイズ、共有テンプレートなど CSSで段組をやるには普通floatかpositionを使いますが、どのように使い分けるのか。 これはいろいろと試行錯誤しているうちにわかってくるものなので、「そんなこと知ってる」という人も多いかと思いますが、まとめてみます。 条件としては以下のような感じ。 HTMLの記述順は「(ヘッダ→)記事→サイドバー(→フッタ)」を守る 記事領域とサイドバーの長さはページによって異なる(どちらが長くなるかわからない) サイドバーとフッタの文字が重なる、とかは駄目 floatとpositionの違いは、「floatは下方向に融通が利く」のに対し、「positionは上方向に融通が利く」といえます。 何のことかさっぱりわからないと思いますが、つまりこういうことです。 フロートはソース上で

  • 1