
A 回答 (4件)
- 最新から表示
- 回答順に表示
No.4
- 回答日時:
テスト用簡単なサンプル
★タブは_に置換してあるので戻す。
[HTML4.01strict]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="ja">
<head>
_<meta http-equiv="content-type" content="text/html; charset=Shift_JIS">
_<title>サンプル</title>
_<meta name="author" content="ORUKA1951">
_<meta http-equiv="Content-Style-Type" content="text/css">
_<link rev="made" href="mailto:oruka1951@hoge.com" title="send a mail" >
_<link rel="START" href="../index.html">
<!-- 永続的スタイルシート -->
_<link rel="stylesheet" type="text/css" href="./styleSheet5/persistent.css">
<!-- 優先スタイルシート -->
_<link rel="stylesheet" type="text/css" media="screen" href="./styleSheet5/outline.css" title="優先スタイル">
_<link rel="stylesheet" type="text/css" media="screen" href="./styleSheet5/color.css" title="優先スタイル">
<!-- 代替スタイルシート -->
_<link rel="Alternate StyleSheet" type="text/css" media="screen" href="./styleSheet5/alternate.css" title="反転">
<!-- このページ専用 -->
_<link rel="StyleSheet" type="text/css" media="screen" href="./styleSheet5/page1.css" title="優先スタイル">
<!-- 印刷用 -->
_<link rel="styleSheet" type="text/css" media="print" href="./styleSheet5/print.css">
</head>
<body>
_<div class="header">
__<h1>タイトル</h1>
__<p>このページでは・・・・</p>
_</div>
_<div class="section">
__<h2>見出し</h2>
__<p>
___terapadでhtmlとCSSを書いてます。5本のhtmlファイルに共通するCSSはちゃんとlIEに反映されるのですが、個別のhtmlファイルに関するCSSが反映されません。IEの問題かと思うのですが、どうすれば解決できるのでしょうか?
__</p>
__<div class="nav">
___<ol>
____<li><a href="/">Top</a></li>
____<li><a href="/sample/page1">Page1</a></li>
____<li><a href=".sample/page2">Page2</a></li>
___</ol>
__</div>
_</div>
_<div class="footer">
__<h2>文書情報</h2>
__<dl class="documentHistry">
___<dt id="FIRST-PUBLISHED">First Published</dt>
___<dd>2013-12-20</dd>
___<dt id="LAST-MODIFIED">Last Modified</dt>
___<dd>2013-12-29 12:00:00 (JST)</dd>
__</dl>
__<address>© ORUKA1951 2012 - 2016 All Rights Reserved mailto:*****</address>
_</div>
</body>
</html>
[outline.css]
@charset "Shift_JIS";
div.header,div.section,div.footer{width:80%;min-width:620px;max-width:900px;margin:0 auto;padding:5px;}
div.section{position:relative;min-height:400px;}
div.section h2,div.section p{margin-right:21%;}
div.section div.nav{position:absolute;right:0;top:0;height:100%;width:20%;}
[persistent.css]
@charset "Shift_JIS";html,body{margin:0;padding:0;}
h1,h2,h3,h4,h5,h6,p{margin:0;line-height:1.8em;}
p{text-indent:1em;}
[color.css]
@charset "Shift_JIS";
body{background-color:silver;}
div.header,div.section,div.footer{background-color:white;}
div.section div.nav{background-color:yellow;}
[alternate.css]
@charset "Shift_JIS";
body{background-color:silver;}
div.header,div.section,div.footer{
background-color:navy;
color:white;
width:90%;min-width:620px;max-width:1000px;margin:0 auto;padding:5px;
}
a:link{color:yellow;}
[page1.css]
@charset "Shift_JIS";
body{background-color:gray;}
div.header,div.section,div.footer{background-color:rgb(220,255,255);}
div.section div.nav{background-color:yellow;}
div.section p{z-index:100;}
div.section p:after{content:"\A このページ専用のスタイルシートが適用されています";white-space:pre;color:red;font-weight:bold;font-size:1.6em;}
[print.css]
@charset "Shift_JIS";
body{width:80%;margin:0 auto;}
a{color:black;text-decoration:none;}
a[href]:after{content:"\A (http://hoge.com"attr(href)")";white-space:pre;}
div.section div.nav:before{content:"サイトマップ\A";font-size:1.6em;font-weight:bold;white-space:pre;}
div.section div.nav{width:80%;margin:20px auto;border:solid 1px gray;}
No.2
- 回答日時:
質問内容がもう一つ不明なのですが、原因はちゃんとリンクされていないことでしょう。
リンク先が正しいなら、その正しいリンク先にCSSを置いていない。
CSSの置き場所が正しいなら、参照先の記述が間違っている。
「abcd,css」などドットがカンマになっていて、CSSとして機能していないという可能性もあり。
この回答への補足
回答ありがとうございます。CSSはちゃんとリンクしていると思うのですが(5本の共通コンテンツはちゃんとCSSを反映している)なぜか個別のCSSが反映されないのです。分かりにくくてすみません。
補足日時:2013/12/21 18:32お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
ブログの本文のみリンク色を変...
-
liリストタグの背景色に色がつ...
-
サイトにjQueryが使用されてい...
-
innerHTMLを使用するとうまく表...
-
個別にリンクの色を変える方法
-
「目次」と「サブ目次」のスタ...
-
HTML要素のid/class名の長さに...
-
idの中のid指定
-
スタイルシートのドットが#に...
-
CSSで、DIV#hogeという記述は何...
-
htmlのid属性って必要なの?
-
htmlの文字が縦書きになる
-
ホームページの下にあるcopy ri...
-
ボタンをセル内一杯に表示させ...
-
訪問済のリンク色を変えない方法
-
既婚男女の方、結婚前と結婚後...
-
html の divとtable の役割
-
aの中にspan
-
テンソル解析(絶対微分学)は...
-
htmlのolやulなどlistにtitleや...
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
htmlのid属性って必要なの?
-
個別にリンクの色を変える方法
-
idの中のid指定
-
liリストタグの背景色に色がつ...
-
サイトにjQueryが使用されてい...
-
HTML要素のid/class名の長さに...
-
CSSのクラス名・ID名の指定でワ...
-
a要素の色を複数使い分ける方法
-
FC2掲示板をトピック一覧表示型...
-
スタイルシートについて
-
CSSに同じclass名がいっぱい‥。...
-
brにクラスをつけてcssでdispla...
-
webデザイン 疑問点
-
CSS 記事内link色変更方法
-
親エレメントに含まれる子エレ...
-
cssでIEとFIREFOX(とchrome)の...
-
CSS内で使われる山括弧の意味が...
-
css:positionの挙動について
-
スタイルシートのドットが#に...
-
dreamweaverのコード画面で波線。
おすすめ情報