ヘッダーを画像に置換してみた
Nibbleblogの初期テーマの一つであるGoogleSimpleが地味だったので、CSSを弄ってヘッダーを画像に置換してみた
2015-10-12 | Nibbleblog
本テーマが地味過ぎる件
現在このNibbleblogの初期テーマの一つであるGoogleSimpleを使用しているが、このテーマがあまりにシンプル過ぎるので、CSSファイル(/themes/google_simple/css/main.css)の一部を弄ってヘッダーの背景を990x162pxの画像にしてみた。ちなみにこの背景画像、昔にデジカメで撮ったお台場の夜景をJTrimで加工したもの。ここ海外無料サーバーでNucleus CMSを利用していた際にもヘッダーに使用していた画像とそのための手法だけど、どうだろう。
CSSの修正内容
#container {
margin: 0 auto;
/* max-width: 900px; */
min-width: 600px;
/* 以下追加 */
width: 85%;
}
#head {
/* background: -moz-linear-gradient(center top , #FAFAFA, #F5F5F5) repeat scroll 0 0 #F5F5F5;
border-bottom: 1px solid #EEEEEE;
color: #444444; */
font-size: 3em;
/* font-weight: lighter;
line-height: 140px; */
margin-bottom: 30px;
/* 以下追加 */
min-width: 600px;
height: 160px;
background: url('img/header.png') no-repeat scroll left bottom #000000;
padding: 0 10px;
}
#head div.wrap {
margin: 0 auto;
/* max-width: 900px; */
min-width: 600px;
/* 以下追加 */
width: 85%;
line-height: 1;
padding: 65px 0 0;
}
#head a.name {
/* color: #63666A; */
text-decoration: none;
/* 以下追加 */
color: #FFFFFF;
}
#head span.slogan {
/* color: #63666A; */
/* 以下追加 */
font-size: 0.7em;
}
不要となるプロパティをコメントアウトし、min-width等のプロパティを足したんだけど、描画時に画面外にはみ出た背景画像が描画されないのをmin-widthプロパティで描画されるように追加したのがキモ。レスポンシブデザインなんて知るかコノヤロー(と心の中で叫びながらmax-widthプロパティをコメントアウト)。
一方でついでと称して、文字を16pxと大きく、プロポーショナルフォントには林檎向けにHelvetica NeueとHelveticaという欧文書体を加え、行間を26pxに広げ、左カラムを大きく広げ、といろいろCSSを弄っていたら、収拾がつかなくなった。どうしよう。

コメントはありません
コメント