ユーザーCSSで英辞郎スキン

The Opera blogを参考にして自分でも作ってみた。Opera9.2 on Xubuntuで動作確認(小さい文字はWindowsでは見にくいかも)。他のブラウザは知らない。

英辞郎のデフォルトの色使いが好きなので、それは残す方向で。



コードは、オリジナルより幾分簡潔に、こんな感じ。オリジナルと同じで、上の検索バーは固定してあるのでスクロールしても動かない。

/* 不要項目非表示 */
script ,
body > div > table:first-child ,
body > div > table:first-child + table ,
body > div > table:first-child + table + table ,
body > div > table:first-child + table + table + table .j9 , 
body > div > table:first-child + table + table + table + table ,
body > div > table:first-child + table + table + table + table + table ,
body > div > table:first-child + table + table + table + table + table + table td > table:first-child ,
body > div > table:first-child + table + table + table + table + table + table table:first-child + table ,
body > div > table:first-child + table + table + table + table + table + table + br + script + table
{
	display: none;
}

/* 検索窓 "英和・和英" "クリア" */
body > div > table:first-child + table + table + table {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
}

/* "次候補" */
body > div > table:first-child + table + table + table + table + table + table div[align="right"] {
	position: fixed;
	top: 0.1em;
	left: 450px;
}

/* 検索結果 */
body > div > table:first-child + table + table + table + table + table + table{
	width: 100%;
	font-size: x-small;                         /* フォントを小さくしたくなければこの行は削除 */
}


これをwww.alc.co.jpではなくwww2.alc.co.jpに適用する。


追記>2007-05-22
↑ありえないほどひどい。一応書き直した。まだOperaFirefoxで一致しない。まだ修正するけど今日は眠いので終わり。

body {
	margin: 0;
	padding: 0;
}

body > div{
	width: 50em;                                  /* Opera用。Firefoxの場合は削除。 */
	width: 100%;                                 /* Firefox用。Operaの場合は削除。 */
	margin: 0 auto 0 auto; 
}

/* 不要項目非表示 */
script ,
body > div > table:first-child ,
body > div > table:first-child + table ,
body > div > table:first-child + table + table ,
body > div > table:first-child + table + table + table .j9 , 
body > div > table:first-child + table + table + table + table ,
body > div > table:first-child + table + table + table + table + table ,
body > div > table:first-child + table + table + table + table + table + table td > table:first-child ,
body > div > table:first-child + table + table + table + table + table + table table:first-child + table ,
body > div > table:first-child + table + table + table + table + table + table + br + script + table
{
	display: none;
}

/* 検索窓 "英和・和英" "クリア" */
body > div > table:first-child + table + table + table {
	position: fixed;
	width: 50em;                                /* Opera用。Firefoxの場合は削除。 */
	width: 100%;                                /* Firefox用。Operaの場合は削除。 */
	margin: 0 auto; 
	top: 0;
}

/* 検索結果 */
body > div > table:first-child + table + table + table + table + table + table{
	width: 50em;
	overflow: hidden;
	margin: 0 auto;
	font-size: 90%;
}

/* "次候補" */
body > div > table:first-child + table + table + table + table + table + table div[align="right"] {
	width: 50em; 
	position: fixed;
	margin: 0 auto;
	top: 0.1em;
}