IE6のCSSやJavaScriptなどのバグや仕様で困った時の解決方法をまとめたチートシートをVirtuosi Mediaから紹介します。
IE6のCSSやJavaScriptなどのバグや仕様で困った時の解決方法をまとめたチートシートをVirtuosi Mediaから紹介します。
A common problem with float-based layouts is that the floats' container doesn't want to stretch up to accomodate the floats. If you want to add, say, a border around all floats (ie. a border around the container) you'll have to command the browsers somehow to stretch up the container all the way. The problem Let's try it. This is the CSS we'll use throughout the page: div.container { border: 1px s
CSS-Tricksから、大きい画像を余白を作らずにブラウザのサイズに合わせて、背景に表示するスタイルシートを紹介します。 Perfect Full Page Background Image 下記、それを実装する要件とテクニックを二つ、それぞれポイントをピックアップして紹介します。 実装の要件 前提として、画像のサイズを調整する必要があるため、background-imageプロパティでの配置は不適格とします。 それを踏まえ、以下の条件をクリアさせます。 ページは画像でいっぱいに、余白は無しで 画像の大きさは自動調整 画像の比率は維持 画像はページ中央に 画像はスクロールさせない クロスブラウザ対応 一つ目のテクニックは余分なマークアップが必要で、IE6用にJavaScriptを使用したものを紹介しています。 二つ目のテクニックは、余分なマークアップを無くし、JavaScriptも必要と
更新履歴 2009-11-11 ご要望があったので jQuery.exInlineBlock.js の圧縮版をダウンロードできるようにしました。 CSS には display:inline-block というボックス要素を横並びに配置させる機能があります。 通常のボックス要素(diplay:block)は、横に伸び、縦に縮む性質があり以下のように段積みになります。 幅を指定してサイドに空間を設けても、ブロック要素なので段積みになります。 inline-block の場合は、横にも縦にも縮む性質があり、span や a の inline 要素のように要素を横並びにします。 inline 要素と同様、親(先祖)要素で text-align:center とすればセンタリングもされます。 画面のレイアウトやパーツを配置する上でとても便利な機能ですが、IE6/7 、 Firefox2 以下ではこの
リストタグを使用してメニューを作ることは良くあると思いますが、この時にIEだけに変な隙間が入る事があります。Firefox、Safari等で見るとちゃんと隙間なく詰まってるのに。。。またIE様のバグですかぁ。と憤る方もいると思います。 これはmarginやpaddingの問題でなく、IEではリスト内のインライン要素をブロック化した場合、line-heightの解釈がおかしくなるみたいです。 →メニューの間に隙間ができるサンプル 解決策は以下のとおり。 HTMLコード <ul> <li><a href="#">メニュー01</a></li> <li><a href="#">メニュー02</a></li> <li><a href="#">メニュー03</a></li> </ul> CSSコード ul { list-style-type: none; width: 300px; }
リストタグを使用時のIEでの変な隙間を消す 私的覚え書き。 リストタグを使用してメニューを作ったりする際にIEだけに変な余白が入る事がある。それを解消するネタ。 >>問題のサンプル・こんな感じ。 Firefox等で見るとちゃんとメニューの間が詰まっててOKなのだが、IEの場合だと勝手に余白が入る。marginやpaddingを0にしても、liタグを途中改行しても効果なしで、その都度ごまかしてきたりしてたんだけど、とりあえず原因はIEの場合、リスト内のインライン要素をブロック化すると余計な余白を入れるというかline-heightの解釈が正しくないっぽい。 >>対策はこんな感じ。 li { line-height:0; } a { display: block; background-color:#900; padding: 5px; color: black; text-decoratio
web-conte.comでも画像の拡大表示時に使っている「Lightbox JS v2.0」。これ、ページ内にFlashが同居していると厄介なのである。自分のサイト(ここ)だとそもそもFlashを置いていないから気づきにくい問題なのだが、先日あるサイトを作っていてこのことに気づいた。Flashオブジェクトは z-indexなどの指定を無視し、基本的にドキュメントの最前面にあるように表示されてしまうため、Flashだけは背景に追いやられず、Lightboxで拡大表示させた画像のさらに手前に出てきてしまう。 このことの解決策はひとまずあって、たとえば「小粋空間: Lightbox JS でブログパーツ等の Flash を PNG 背景画像の下に隠す」などの解説が丁寧だ。要は、Flashを埋め込む際の記述のひとつに「背景を透過する」という命令にあたるものがあって、それを書き加えてやればいい。
こんにちはこんにちは!! 今日は、きみの人生をちょっぴり豊かにするライフハックの紹介なんです! ★はてなスターをもらう簡単な方法★ 1. 巨大な透過gif画像を用意 → http://hamachiya.com/junk/bt3000.gif 大きすぎる画像はIEが表示できないかもしれないから3000x3000くらいがいいかも? 2. 用意した画像をAddボタンとして設定 設定→デザイン→詳細のスタイルシート .hatena-star-add-button-image { background-image: url(http://hamachiya.com/junk/bt3000.gif); } Addボタンが 3000x3000px(透明) になりました。 3. Addボタンを浮かせて前面に配置 .hatena-star-add-button { position: absolute;
Web制作において、対応しなくてはいけないブラウザの中には、未だしぶとくIE6が残っています。IE6が2001年に登場したことを考えると、もう8年もその時代の「縛り」を(健気に)守りながら作っていることになるんですね。 いま良く使われているCSSのテクニックも、ほとんどはこの「縛り」の範囲内で有効な手法なわけですから、突然2001年にタイムスリップしてサイトを作る事になったとしても、今も昔も変わらない1つの古文書に従えばいいので、きっと活躍できます。 しかしたまらん、流石に疲れた。 ボックスひとつができること CSSでは、文書を構成する各要素は、ボックスという矩形領域に置きかえられ、それらの持つプロパティを操作して装飾します。つまり、ボックスはページデザインを構成する最小単位と言えるわけですね。 そこで今回は、最小単位となる1つのボックスに対して、どのような装飾手法が有効かという点を、CS
スタイルシートのmarginで使用する「ネガティブマージン(マイナスマージン)」について理解しておくべきこと、ネガティブマージンを使用したテクニックなどをSmashing Magazineから紹介します。 The Definitive Guide to Using Negative Margins 1. ネガティブマージンの理解 2. ネガティブマージンの使い方 3. ネガティブマージンのテクニック集 4. ネガティブマージンのバグフィックス 5. 終わりに 1. ネガティブマージンの理解 スタイルシートを使用する際、必ずといっていいほどマージンを使用するでしょう。しかし、ネガティブマージンになると意見は分かれ、それは悪魔の仕事であると考える人たちもいます。 ネガティブマージンをは、例えばこういうのです。
The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. The general reasoning behind this was discussed in a May 2007 post, if you're interested. Reset styles quite often appear in CSS frameworks, and the original "meyerweb reset" found its way into Blueprint, among others. The reset styles given here a
It’s not easy finding talented graphic designers, but it’s fair to say the best have a healthy online presence. So to make things easier, here I present my top 50 graphic design blogs. I’ve categorised them by Google PageRank (PR) — Google’s way of determining the authority of a website. *Don’t read too much into the PageRank, as all of these sites contain excellent articles, with some blogs havin
CSS is almost certainly one of the best developments in web design since the first graphical web browsers were adopted on a wide scale. Where tables created clunky, slow-loading pages, CSS created much more streamlined and usable web pages. Plus, CSS has allowed designers to achieve a number of different styles that used to only be possible with images. One of the best parts of CSS is that it’s so
CSS isn’t always easy to deal with. Depending on your skills and your experience, CSS coding can sometimes become a nightmare, particularly if you aren’t sure which selectors are actually being applied to document elements. An easy way to minimize the complexity of the code is as useful as not-so-well-known CSS attributes and properties you can use to create a semantically correct markup. We’ve ta
When building a website, using a CSS framework is a real time saver as it provides you with tools every web designer and front-end developer needs when crafting a site (other than good web hosting). A CSS framework is a software framework created to allow for easier, more standards-compliant web design using HTML/CSS. Many popular CSS frameworks are design-oriented and contain elements that can be
CSS3 property tests This information is now maintained in our Wiki. Head over and see the latest details, and even contribute yourself. While the assumption has been that the version of Safari in the iPhone is very close to Safari 3 for the Mac and Windows in terms of support for CSS, that does not seem to be the case. While Safari 3 supports just about all of the following properties, at least in
bttn.css Library bttn.css is a collection of lightly-styled buttons that feature different shapes, sizes, and colors. All styles can be called with simple class names. With the minified CSS file coming in at just 4kb, this library is also quite lightweight. CSS Buttons Collection The title may be simple, but Buttons is a library with over 20 collections of styles to choose from. Standouts include
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く