jspにcssを反映させたいです。
eclipseを使っています。
jspファイルの<head>の中にlinkの記述はしているのですが、cssが効きません。
jspファイルとcssファイルはWebContent内に配置しています。
検証ツールを使って確認しても、cssファイルを感知していない様です。
該当のソースコード
jsp
1<%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3<!DOCTYPE html> 4<html> 5<head> 6<meta charset="UTF-8"> 7<title>HEADER</title> 8<link rel= “stylesheet” href= “header.css”> 9</head> 10<body> 11 <header> 12 <div class="share-header"> 13 <div class="h-contents"> 14 <div class="h-component"> 15 <div class="h-component-h1">地元の掲示板 ジモティー</div> 16 <div class="h-flex-component"> 17 <div class="number-of-data"> 18 0件 5/18日更新 <a class="click-link-black" href="">地元の掲示板 ジモティー</a> 19 </div> 20 <div class="h-a-flex"> 21 <a class="begnner" href="">初めての方へ</a> <a class="login-button" 22 rel="nofollow" href="">ログイン</a> 23 <div class="h-regist-button"> 24 <a class="r-buttom" rel="nofollow" href="">会員登録</a> 25 </div> 26 </div> 27 </div> 28 </div> 29 </div> 30 </div> 31 </header> 32</body> 33</html>
css
1@charset "UTF-8"; 2 3.h-component-h1 { 4 color:red; 5}
試したこと
jspファイルの<head></head>内に、<link>タグを設置しパスを色々と変えてみた。
補足情報(FW/ツールのバージョンなど)
Eclipse IDE for Enterprise Java Developers.
Version: 2018-12 (4.10.0)
Build id: 20181214-0600
回答3件
あなたの回答
tips
プレビュー