• 締切済み

wardpressのコード

始めまして、 wardpressを用いてホームページを作成しているものですが、 見出しの書き方で教えてほしいことがありまして、投稿させて頂きました。 記事の中に見出しを作りたいと思い、参考サイトからコードを見つけました。 それをテキスト内に記述しましたが、反映されなく困っております。 コードは下記のとおりです。 ※右のURLサイトの5番を参考にさせて頂きました。http://weboook.blog22.fc2.com/blog-entry-348.html 下記のコード以外に、何を記載すればURLに記載されているような見出しが作れるのでしょうか? お手数ですが、ご回答お願いいたします。 ーーーーーーーーーーーーーコードーーーーーーーーーーーーーーーーーーーーーー h4.fukidashi{ position: relative; color: #111; background: #ccc; font-size: 20px; line-height: 1; margin: 30px 20px 10px -10px; padding: 14px 5px 10px 50px; border-radius: 22px 0 0 22px; } h4.fukidashi:before { content: ""; position: absolute; background: #eee; top: 50%; left: 14px; margin-top :-10px; height: 20px; width: 20px; border-radius: 50%; box-shadow: 1px 1px 1px #777 inset; } h4.fukidashi:after { content: ""; position: absolute; top: 0; right: -22px; height: 0; width: 0; border: 22px solid #ccc; border-right-color: transparent; } <h4 class="fukidashi">見出し2</h4> ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

noname#229062
noname#229062
  • CSS
  • 回答数2
  • ありがとう数0

みんなの回答

回答No.2

こちらでやったら、ちゃんと出ましたよ。 それで、思いっきり忘れてるものがありませんか? <style>タグないんじゃないかと。

  • garo1970
  • ベストアンサー率52% (54/103)
回答No.1

cssの設定部分をどこに書いているのかなと思ったのですが、 まさか投稿欄にこれをつらつら全部書いているわけではないですよね? cssは外部cssファイルに書いてありますか? そのファイルを読込むようになっていますか?

関連するQ&A

  • a:hover 時にテキストが表示されません。

    コード初心者です。 コピペしたものを若干数字を変えて使用しようとしましたが、テキストが表示されません。他の解説をみましたが、自分との違いがよく分からないため質問させていただきました。 以下htmlとcssを記載しますので、どなたかご教授いただけないでしょうか・・・・。 html <a href="#" class="button"> <section id="news"> <h2>お知らせ</h2> <p> 9月10日㈭ 遊びに来てね!! </p> </section> </a> css #news{ width: 100%; height: 180px; margin: 0px auto 50px; border-radius: 10px; background-color: rgb(204, 160, 160); } .button{ position: relative; display: block; width: 90%; margin: 0 auto; transition: .3s; color: rgb(41, 35, 35); } .button:hover{ color: aliceblue; } .button::before { position: absolute; width: 100%; height: 180px; border-radius: 10px; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; content: ''; background: rgb(37, 59, 26); transform-origin: right top; transform: scale(0, 1); transition: transform .2s; } .button:hover::before { transform-origin: left top; transform: scale(1, 1); color: ghostwhite; } 宜しくお願い致します!!!!

    • ベストアンサー
    • CSS
  • cssのショートハンドについて質問です。

    cssのショートハンドについて質問です。 以下のコードをショートハンドで書きたいのですが、どこまでできますか? 回答宜しくお願いします。 .ranking:after { content:""; background-image: url(../image/arrow.png); background-repeat: no-repeat; position: absolute; display: block; top: 50%; margin-top: -10px; right: 10px; width: 20px; height: 20px; }

    • ベストアンサー
    • CSS
  • css 左右の背景が異なる設定方法

    下記の1ページだけ、右背景が途中で切れてしまう不具合が出てしまいました。 このような感じです。 http://marimekko2525.web.fc2.com/ 設定方法は下記のサイトを参考にして作りました。 http://www.webopixel.net/javascript/517.html スライドショーが入っている”<div id="cont">”部分に原因があると思うのですが、 改善策が分かりません。。。 どなたか分かる方いらっしゃいましたらアドバイスをお願いします。 cssソース /*====↓reset.css↓====*/ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,legend,input,p,blockquote,th,td { margin:0;padding:0; } img{ border: 0; } /*====↓base.css↓====*/ #cont { width: 610px; height: 100%; position: relative; margin: 50px auto; z-index: 70; overflow: hidden; } #works_deta{ clear:both; margin-top:100px; margin-bottom:10px; padding:20px; background-color:#333535; } #works_deta h4, #works_deta_right h5{ margin-bottom:10px; } #works_deta_left{ float:left; } #works_deta_right{ float:right; width:390px; } #works_deta_right p{ color:#ffffff; font-size: 85%; line-height:1.8em; } hr#works_deta_right{ clear:both; } p.works_deta{ color:#ffffff; font-size: 85%; line-height:1.8em; text-align:right; clear:both; } #works_deta_right img.back_to_list{ float: right; } /*====↓iview.css↓====*/ /* The slider */ .iviewSlider { overflow: hidden; } /* The timer in the Slider */ #iview-timer { position: absolute; z-index: 100; border-radius: 5px; cursor: pointer; } #iview-timer div { border-radius: 3px; } /* The Preloader in the Slider */ #iview-preloader { position: absolute; z-index: 1000; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; border: #000 1px solid; padding: 1px; width: 100px; height: 3px; } #iview-preloader div { float: left; -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; height: 3px; background: #000; width: 0px; } /* The strips and boxes in the Slider */ .iview-strip { display:block; position:absolute; z-index:5; } .iview-block { display:block; position:absolute; z-index:5; } /* Direction nav styles (e.g. Next & Prev) */ .iview-directionNav a { position:absolute; top:45%; z-index:9; cursor:pointer; } .iview-prevNav { left:0px; } .iview-nextNav { right:0px; } /* Control nav styles (e.g. 1,2,3...) */ .iview-controlNav { position:absolute; z-index:9; } .iview-controlNav a { z-index:9; cursor:pointer; } .iview-controlNav a.active { font-weight:bold; } .iview-controlNav .iview-items ul { list-style: none; } .iview-controlNav .iview-items ul li { display: inline; position: relative; } .iview-controlNav .iview-tooltip { position: absolute; } /* The captions in the Slider */ .iview-caption { position:absolute; z-index:4; overflow: hidden; cursor: default; } /*====↓style.css↓====*/ .container { display: block; width: 600px; margin: 0px auto; } #iview { display: block; width: 600px; background: #000; background: rgba(0, 0, 0, 0.7); padding: 5px; border-radius: 5px; position: relative; margin: 10px auto; } #iview .iviewSlider{ display: block; width: 600px; height: 360px; overflow: hidden; border-radius: 4px 4px 0px 0px; } .iview-controlNav { position: static; height: 45px; text-align: center; border-radius: 0px 0px 4px 4px; } .iview-controlNav .iview-items { display: block; padding: 0px 20px; } .iview-controlNav a img { height: 60px; border: #000 1px solid; margin: 20px 10px 20px 0px; border-radius: 2px; } .iview-controlNav a.active img { border-color: #999; } #iview-preloader { border: #666 1px solid; width: 150px } #iview-preloader div { background: #666; }

  • 見出しーCSS表示方法についてお願い致します

       お世話になっております。  以下のサイトが便利だと思い、リボンタイプの”見出し”の生成を試みました。 http://web-dou.com/tool/css_gen_h.php [CSSコード] h6.{   sample2     position: relative;     color: #ffffff ;     background: #FF0000;     font-size: 16pt ;     line-height: 1;     margin: 20px -10px 20px -10px;     padding: 10px 5px 10px 20px;     box-shadow:1px 3px 7px 0px  #663300 ;     border-top:3px solid #ff6347; } .sample2:after, sample2:before {     content: "";     position: absolute;     top: 100%;     height: 100;     width: 700;     border: 5px solid transparent;     border-top: 5px solid #333; } .sample2:after {     left: 0;     border-right: 5px solid #333; } .sample2:before {     right: 0;     border-left: 5px solid #333; } [HTMLコード] <h6 class="sample2">メニュー4</h6>  ですが、ブラウザーで開いてみますと、  メニュー4  とだけ、表示されるのみで、目的のリボン型見出しは、表示されな状況にあります。  なお、ブラウザーは、Safari バージョン 5.1.10 を使用しております。  何が問題なのか、もしくは、解決策をご教示いただければ、幸いです。

    • ベストアンサー
    • CSS
  • cssハックについて

    googleとfirefoxでcssが聞かない箇所があります。 css--------- #operation { width: 420px; background-image: url(../picture/top/left_middle.jpg); background-repeat: repeat-y; background-position: center top; margin-top: 10px; } #operation img { border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; } #operation #ope_top { background-image: url(../picture/top/left_top.jpg); background-repeat: no-repeat; background-position: left top; height: 30px; padding-bottom: 0px; margin-bottom: 0px; } #operation #ope_top #ope_tit { font-size: 14px; line-height: 2; font-weight: bold; color: #FFFFFF; text-indent: 10px; float: left; width: 200px; margin-top: 0px; padding-top: 0px; height: 20px; } #operation #ope_top .ope_img { padding-top: 5px; float: right; margin-right: 10px; } #operation #ope_middle { margin-top: 0px; padding-top: 0px; width: 420px; margin-left: -200px;←ここがおかしいです!! } #operation #ope_middle .content ul { margin-top: 5px; padding-left: 30px; list-style-image: url(../picture/list.jpg); } #operation #ope_middle .content li { margin-bottom: 5px; margin-top: 1px; } #operation #ope_middle .content .line01 { border: 1px dotted #CCCCCC; margin-top: 2px; margin-bottom: 2px; } というかんじなのですが、左右へとぶれてしまいます。 どのように修正したいいのか困っております。 参考になるようなことありましたらお願いします。

  • cssによる配置の計算が合いません

    cssによる配置で width の計算がうまくあいません。 コンテンツ部分が 750(ページ)-5(padding)-1(border)-134(navi-width)-5(padding)-1(border)=604(contents-border) ちなみにSafariでは計算通りでした。 IE6ではだめなようです。 くわしくは <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"> BODY { padding-top : 0px; margin-top : 0px; text-align : center; padding-bottom : 0px; margin-bottom : 0px; } #page { background-color : #dd22aa; width : 750px; margin : 0; padding-top : 0px; text-align : left; margin-top : 0px; margin-left : auto; margin-right : auto; margin-bottom : 0px; height: 100%; padding : 0px ; } #header { width : 750px; height : 80px; position : relative; float:left; clear : both; background-color : #008899; padding: 0px; margin: 0px; color : #b99859; } #navi { width : 134px; height : 399px; float : left; position : relative; clear : both; background-color : #ffffff; background-repeat : no-repeat;background-position : center top; padding-top : 50px; padding-left : 0px; padding-right : 0px; padding-bottom : 0px; margin-top : 0px; margin-left : 5px; margin-right : 0px; margin-bottom : 0px; border-left-style : solid; border-left-width : 1px; border-left-color : #000000; } #contents { width :596px; height : 399px; float : right; position : relative; padding : 0px; margin-top : 0px; margin-left : 0px; margin-right : 5px; margin-bottom : 0px; background-color: #9999FF; border-right-style : solid; border-right-width : 1px; border-right-color : #000000; } </style> <title>テスト</title> </head> <body> <div id="page"> <div id="header"> ヘッダー </div> <div id="navi"> ナビゲーション。左のパディングが5px。左のボダーが1px。幅が134px。 </div> <div id="contents"> コンテンツ。右のパディングが5px。右のボダーが1px。幅が596px。計算すると、750-5-1-134-5-1=604(幅)となるはずなのですが、596pxでないとはまりません。 </div> </div> </body> </html>

  • 中央寄せが出来ません。

    下記の様な構成で中央寄せが出来ません。 何がいけないのでしょうか? アドバイスお願い致します。 index.html <body> <div id="hedderdiv"> <div id="hedder"> </div> <div id="buttomgrp"> </div> </div> </body> CSSファイル #hedderdiv { width: 800px; height: 500px; margin: 0 auto; } #hedder { width: 800px; height: 280px; background-color:#3F3; position:absolute; top: 0px; left: 0px; margin: 0 auto; } #buttomgrp { width: 650px; height: 200px; background-color:#C63; position:absolute; top:200px; left:50px; margin: 0 auto; }

    • ベストアンサー
    • HTML
  • CSSのdivで、ページ全体をセンタリング出来ない

    質問させて頂きます。 <style type="text/css"> #contena { margin-right: 10px; margin-left: 10px; text-align: center; height: 900px; width: 950px; } </style></head> というように、全体をdivで囲んだにもかかわらず、何故かセンタリング出来ません。 最も簡単に、このページをセンタリングするには、どうすればよいでしょうか? ホームページビルダーで「どこでも配置モード」で作ったものを、dreamweaverで作り直す場合に該当します。 下記にHTMLを記載しておきます。 <!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"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta name="IBM:HPB-Input-Mode" content="mode/flm; pagewidth=750; pageheight=900"> <meta name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 14.0.8.0 for Windows"> <title>タイトル</title> <style type="text/css"> #contena { margin-right: 10px; margin-left: 10px; text-align: center; height: 900px; width: 950px; } </style></head> <body background="blue_p7b.gif"> <div id="contena"> <div style="top : 0px;left : 20px; position : absolute; z-index : 20; " id="Layer22"><img src="anim.gif" width="373" height="93" border="0" alt="ようこそ"></div> <div style="top : 18px;left : 575px; position : absolute; z-index : 2; " id="Layer4"><a href="http://www.dodgeball.or.jp/"><img src="jdba1.gif" border="0" width="106" height="30"></a></div> <div style="top : 60px;left : 143px; position : absolute; z-index : 1; " id="Layer1"><img src="logo111.gif" width="488" height="69" border="0" alt="リンク"></div> <div style="top : 219px;left : 317px; position : absolute; z-index : 27; width : 580px; height : 51px; " id="Layer28"> <p><font color="#0000ff" size="+2">コンテンツ</font></p> </div> <div style="top : 161px;left : 647px; position : absolute; z-index : 22; " id="Layer23"></div> <div style="top : 255px;left : 284px; position : absolute; z-index : 28; " id="Layer2"><img src="frendlyindx.gif" width="546" height="410" border="0"></div> <div style="top : 216px;left : 652px; position : absolute; z-index : 23; " id="Layer24"></div> <div style="top : 304px;left : 50px; position : absolute; z-index : 26; " id="Layer27"></div> <div style="top : 754px;left : 47px; position : absolute; z-index : 19; width : 707px; height : 154px; " id="Layer21"><iframe frameborder="1" src="saishijoho.html" width="709" height="150" scrolling="AUTO"></iframe></div> <div style="top : 953px;left : 40px; position : absolute; z-index : 7; " id="Layer9"><a href="taikaikekka.html"><img src="button41.gif" width="57" height="54" border="0" alt=" "></a></div> <div style="top : 659px;left : 48px; position : absolute; z-index : 6; " id="Layer8"><img src="logo1.gif" width="194" height="65" border="0" alt="最新情報 "></div> <div style="top : 1020px;left : 34px; position : absolute; z-index : 12; </div> </body> </html> 詳しい方がいましたら、よろしくお願いします。

  • css: IEでsidebarが表示されない

    cssで2カラムのページを左右を両方floatさせて作っています。 firefoxでは表示されるsidebar(背景、画像、テキストを含むすべて)がIE7では表示されません。clearfixの問題かと思いclearfixを入れてみましたがうまくいきませんでした。 どうしたらよいかご存知の方がいたら教えてください。よろしくお願いします。 ちなみにCSSの主要部分は以下のとおりです。 /*--- container ---*/ #container {position: relative;     background:url(images/background.jpg) repeat-y; width: 800px; hight: 600px; padding: 0; margin-left: auto; margin-right: auto; text-align: left; border: 0; } /*--- header ---*/ #header {width: 800px; height: 107px; margin:0;} /*--- side-bar ---*/ #side-bar{position:absolute; background: transparent url(images/menu_bckgrnd.png) center center no-repeat; width: 150px; padding:0; float:left;} #side-bar ul { margin: 0; padding: 50px 50px 50px 50px;    ist-style: none;         width:30px;} #side-bar li { margin: 0; padding: 0;} #side-bar li a{ display:block;} #side-bar a:hover{position: relative; top: 1px; left: 1px;} /*--- main-nav: content area ---*/ #main-nav {background: url(images/design.png) top left no-repeat; width: 610px; margin-top: 0 0 0 150px; padding: 0 10px 0 30px; float:right;} #main-nav a:hover {position: relative; top: 1px; left: 1px; } #content1{ float:left; width:200px; margin: 0 2px 20px -20px; background:#fff;} #content2{ float:left; width:200px; margin: 0 2px 20px 2px; background:#fff;} #content3{ float:left; width:200px; margin: 0 2px 20px 2px; background:#fff;} /*--- footer ---*/ #footer {width: 800px; height: 100px; background: transparent; margin: -100px 0 0 0; clear: both; text-align:center; padding-top:50px;} /* -- clearfix -- */ .clearfix{ zoom:1; } .clearfix:after{content:'.'; display:block; visibility:hidden; height:0; clear:both;}

    • ベストアンサー
    • CSS
  • adressを一番下に表示させたい

    スタイルシート・スタンダード・デザインガイドという本を見ながらサイトを作っています。 サンプルを元にいろいろいじっていたらadressが一番下にくるはずなのに一番上に来てしまいます。 どうしたらいいでしょうか。 body { text-align:center; background-image:url(images/bg2.gif); background-color:#ffffff; } p.menu { border: 0; margin: 0; padding: 0; border:0; color:#ffffff; position:absolute; left:50px; top:50px; } p.menu img { margin:0; padding:0; } p.menu a{ padding:0; margin:0; background-color:#ffffff; } p.menu a:hover, p.menu a:active { background-color:#ffff99; } #menu2 { font-size:0.75em; margin-bottom:0; margin-top:50px; height:90%; width:197px; border:solid 1px #ff9999; position:absolute; left:50px; top:100px; background-color:#ffffff; } #menu2 a { color:#5e8eab; text-decoration:none; background-color:#ffffff; display:block; width:100%; line-height:2em } #menu2 a:hover { background-color:#c5e1ed } #menu2 span { color:#c5e1ed; display:none } .contents { width:580px; height:90%; margin-left:0; margin-right:0; margin-bottom:0; background-color:#ffffff; position:absolute; margin-top:20px; left:248px; top:130px; border:solid 1px #ff9999; } .section { margin-left:60px; margin-right:60px; text-align:left; margin-top:2em } address { font-size:0.625em; font-weight:bold; font-style:normal; color:#2d444f; position:absolute; text-align:center; text-valign:bottom; } address a { color:#2d444f; }

    • ベストアンサー
    • HTML

専門家に質問してみよう