Re: [請教] 請問文章內容置中

看板Blog (部落格)作者 (三杯鼠)時間17年前 (2009/03/01 02:33), 編輯推噓1(105)
留言6則, 2人參與, 最新討論串2/2 (看更多)
: ※ 編輯: Sanbeishuu 來自: 59.126.153.107 (03/01 01:16) : 推 nadoka:找內文區塊的css吧... 03/01 01:21 您好 我試著在註解 /*content*/之後找位置加入 text-align:center; 有成功一半 只有文章被置中 可是... 連文章標題也被置中了 不知道要怎麼修改可以只讓內容置中呢 感謝 ------------附上 CSS----------- /* General Set -----------------------------------------*/ body{cursor:url("http://hk.geocities.com/cinkot/onionani01.ani");} a:hover {cursor:url("http://hk.geocities.com/cinkot/onionani02.ani");} body { margin:0px; background:#0B0B0B url(http://l.yimg.com/e/style/9/967/body.jpg) no-repeat center bottom; font:12px/120% "Courier New"; color:#ffffff; } a { color:#FF4800; text-decoration:none; } a:hover { color:#FFF; text-decoration:none; } /* container -----------------------------------------*/ #container1 { background:url(http://l.yimg.com/e/style/9/967/container1.jpg) no-repeat center top; } #container2 { width:950px; position:relative; margin:0 auto; } /* banner and pageheader -----------------------------------------*/ #banner {} #pageheader { padding:20px 0 0; height:120px; } #pageheader h1 { margin:0 10px 0 0; font-size:16px; line-height:150%; } #pageheader h1 a {} #pageheader h1 a:hover {} #pageheader .description {} #pageheader #description2 .description {} h1 .description{display:block;font-size:12px;font-weight:normal;} #description2 {} /* main2 -----------------------------------------*/ /* 包含 content、links */ #main2 { overflow:hidden; } /* content -----------------------------------------*/ #content { float:right; overflow:hidden; width:670px; } .blog {} .date { color:#E0E0E0; padding:25px 5px 0 0; position:absolute; right:30px; background:url(http://l.yimg.com/e/style/9/967/date.gif) no-repeat right 25px; font:11px Arial, Helvetica, sans-serif; height:13px; width:110px; text-align:right; } /* 第二層date */ .datediv {} .blogbody { padding:0px 0px 10px; } /* 第二層blogbody */ .blogbody2 {} /* .articletext 包含 .title .extended .innertext .extended */ .articletext {} .articletext .title { background:url(http://l.yimg.com/e/style/9/967/title.gif) no-repeat 0px 0px; text-indent:50px; margin:10px 0; padding:20px 0 0; color:#FF4800; height:29px; font-weight:normal; font-size:18px; overflow:hidden; } .articletext .innertext { margin:0 auto; padding:0 26px; } .articletext .extended { color:#515151; text-align:right; padding:0 26px; } .extended a {} .extended a:hover {} .posted { border-bottom:1px dotted #D1D1D1; color:#515151; text-align:right; padding:0 20px; margin:0px 6px; } /* comments -----------------------------------------*/ .total-comments-div { border-top:0px dotted #999; padding-top:10px; margin-top:10px; } /* 頁碼 */ .comments-linkcontrol , .comments-linkcontrol a { text-align:right; } .comments-linkcontrol { color:#FF4800; } .comments-linkcontrol a { border:1px solid #FF4800; color:#979797; padding:1px 5px 0pt; } .total-comments-div .trackback-url { margin:0px 6px; } .total-comments-div .trackback-url #trackback_url { color:#07121C; background:#D4D0C8; width:410px; } .total-comments-div .trackbacks-head {} .total-comments-div .comments-head , .total-comments-div .trackbacks-head .comments-head , .total-comments-div .comments-bottom .comments-head { padding:5px 0px; color:#FFF; background:url(http://l.yimg.com/e/style/9/967/comments.jpg) no-repeat left top; text-indent:10px; font-size:13px; margin:10px 0px; } .total-comments-div .comments-body { border-bottom:1px dotted #D1D1D1; padding:0; margin:0 0 10px; } .total-comments-div .comments-body .comments-post { text-align:right; color:#515151; } .total-comments-div .comments-body .comments-post a { color:#515151; } /* 給個回應區塊 */ .comments-bottom { border-top:1px solid #FF4800; border-right:1px solid #FF4800; border-left:1px solid #FF4800; margin:10px 0; } .total-comments-div .comments-bottom .comments-head { margin:1px; } .total-comments-div .comments-body form { padding:10px; } #xxx1.comments-body { padding-top:40px; border-right:1px solid #FF4800; border-left:1px solid #FF4800; border-bottom:1px solid #FF4800; } /* 站長回覆 */ .total-comments-div .comments-author { background:#363636; border-bottom:1px dotted #D1D1D1; padding:10px 10px 5px; margin:0 0 10px; color:#E5E5E5; } .total-comments-div .comments-author .comments-post { text-align:right; color:#666666; } .comments-author .comments-post a { color:#666666; text-decoration:none; } .postuser {} .postemail {} .postweb {} #nameid {} #email {} #url {} #text {width:300px;} /* divThird 第三欄式設定,若兩欄式則不需設定 #divThird 的 position -----------------------------------------*/ #divThird {} #divThird2 {}/* 第二層divThird */ /* links 選單 -----------------------------------------*/ #links { float:left; width:240px; line-height:22px; } #links2 {} .sidetitle { background:url(http://l.yimg.com/e/style/9/967/sidetitle.jpg) no-repeat left top; text-indent:10px; font-size:13px; text-align:left; margin:1px; height:33px; padding:5px 0px 0px; overflow:hidden; color:#D1D1D1; } #SlidePicTitle { color:#FF4800; font-size:12px; } /* links內的區塊內距 */ .side { padding:10px 25px 10px; } #boxSlideShow .side { padding:0 0 0 23px; } /* links 選單進階設定 -----------------------------------------*/ div.calendar, #boxMySpace , #boxSlideShow , #boxMusic , #boxNewArticle , #boxCategory , #boxCollectionCategory , #boxCollection , #boxDate , #boxSearch , #boxNewComment , #boxSmallMap , #boxRssList , #boxNewTrackback , #boxFolder , #boxWho , #boxCounter { border:1px solid #FF4800; width:100%; margin:0 0 5px; } /* 行事曆區塊 */ div.calendar { padding:15px 0 0; margin:0 0 10px; line-height:120%; height:180px; } /* 行事曆 */ div.calendar table { background:url(http://l.yimg.com/e/style/9/967/calendar.gif) no-repeat scroll 3px 22px; } div.calendar a { color:#FFF; } div.calendar a:hover { color:#FF4800; } /* 年月切換 */ caption.calendarhead {padding:0px;} caption.calendarhead a { color:#FFF; margin:0 3px; } caption.calendarhead a:hover { color:#FF4800; } /* 星期 */ th span.calendar { } /* 日期 有連結時 */ span.calendar a { color:#FF4800; } span.calendar a:hover { color:#FFF; } #boxProfile {}/* xxxxxx的地盤 */ #boxProfile .boxProfile0 {} #boxProfile .boxProfile0 .sidetitle {} #boxProfile .boxProfile1 {} #boxProfile .boxProfile1 .side {} #boxProfile .boxProfile1 .side .boxProfileImg {}/* 個人封面照片縮圖 */ #boxProfile .boxProfile1 .side .boxProfileLink {}/* 四個連結:xxx的個人資料、 xxx的網誌首頁、xxx的相簿、xxx的留言版 */ #boxProfile .boxProfile1 .side select {}/* 好友名單 */ #boxSlideShow {}/* 播放中的相簿 */ #boxSlideShow .boxSlideShow0 {} #boxSlideShow .boxSlideShow0 .sidetitle {} #boxSlideShow .boxSlideShow1 {} #boxSlideShow .boxSlideShow1 .side {} #boxNewArticle {}/* 最新的文章 */ #boxNewArticle .boxNewArticle0 {} #boxNewArticle .boxNewArticle0 .sidetitle {} #boxNewArticle .boxNewArticle1 {} #boxNewArticle .boxNewArticle1 .side {} #boxCategory {}/* 文章分類 */ #boxCategory .boxCategory0 {} #boxCategory .boxCategory0 .sidetitle {} #boxCategory .boxCategory1 {} #boxCategory .boxCategory1 .side {} #boxDate {}/* 文章彙集 */ #boxDate .boxDate0 {} #boxDate .boxDate0 .sidetitle {} #boxDate .boxDate1 {} #boxDate .boxDate1 .side {} /* 搜尋這個網誌的文章 */ #boxSearch .boxSearch0 {} #boxSearch .boxSearch0 .sidetitle {} #boxSearch .boxSearch1 {} #boxSearch .boxSearch1 .side { padding-top:0px; } /* 搜尋 */ #scupioSearch .scupioSearch0 {} #scupioSearch .scupioSearch0 .sidetitle {} #scupioSearch .scupioSearch1 {} #scupioSearch .scupioSearch1 .side {} /* 最新的回應 */ #boxNewComment {} #boxNewComment .boxNewComment0 {} #boxNewComment .boxNewComment0 .sidetitle {} #boxNewComment .boxNewComment1 {} #boxNewComment .boxNewComment1 .side { text-align:right; line-height:100%; padding-top:0px; } #boxNewComment .boxNewComment1 .side a { text-align:left; display:block; margin:15px 0 0; } /* 我的訂閱 */ #login_5 { margin:0px 0px 0px 25px; } /* 最新的引用 */ #boxNewTrackback .boxNewTrackback1 .side { text-align:right; line-height:100%; padding-top:0px; } #boxNewTrackback .boxNewTrackback1 .side a { text-align:left; display:block; margin:15px 0 0; } #boxNewTrackback .boxNewTrackback1 .side span a { display:inline; } /* 誰來我家 */ #boxWho { margin:10px 0 20px; padding:0px 0px 10px; } #whowrapper { margin:10px 0px 0px; } #boxFolder {}/* 自訂資料夾 */ #boxFolder .boxFolder0 {} #boxFolder .boxFolder0 .sidetitle {} #boxFolder .boxFolder1 {} #boxFolder .boxFolder1 .side {} /* 參觀人氣統計 */ #boxCounter {} #boxCounter .boxCounter0 {} #boxCounter .boxCounter0 .sidetitle {} #boxCounter .boxCounter1 {} #boxCounter .boxCounter1 .side { padding:0 0 0 25px; } .syndicate { padding:10px; display:inline; }/*RSS*/ .syndicate img{ filter:gray; } /* powered 無論如何請不要隱藏無名小站的logo -----------------------------------------*/ .powered { padding:10px; } .total-comments-div .powered {}/* 若文章僅開放給會員留言時未登入的區塊顯示 */ .powered .powerlogo img {} /* footer -----------------------------------------*/ #footer {} -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.126.153.107

03/01 03:09, , 1F
如果你是用無名的話,把那句語法加在.innertext{}裡就好
03/01 03:09, 1F

03/01 03:09, , 2F
樣式表若找不到.innertext{} 請自己手動補上
03/01 03:09, 2F

03/01 03:10, , 3F
或是如果你用純文字編輯器發文時 可以使用相關的HTML
03/01 03:10, 3F

03/01 03:11, , 4F
不知道置中的html語法的話就改用進階編輯器發文吧
03/01 03:11, 4F

03/01 13:53, , 5F
感謝大大 我是用wretch沒錯 找到innertext加入後
03/01 13:53, 5F

03/01 13:53, , 6F
目前一切正常 感謝您
03/01 13:53, 6F
文章代碼(AID): #19gODwej (Blog)
討論串 (同標題文章)
文章代碼(AID): #19gODwej (Blog)