Advertisement:

Author Topic: Centerkan Image logo dan background..  (Read 11114 times)

Offline digolbot

  • Semi-Newbie
  • *
  • Posts: 38
Centerkan Image logo dan background..
« on: April 20, 2011, 01:09:11 AM »
Salam.. saya ada masalah sket.. bagaimana untuk centerkan image logo yer..


1) Logo
Code: [Select]
html {
   height: 100%;
   margin-bottom: 1px;
}

/* Normal, standard links. */
a:link {
   color: #be3c4b;
   text-decoration: none;
}

a:visited {
   color: #be3c4b;
   text-decoration: none;
}

a:hover {
   text-decoration: underline;
}

/* Navigation links - for the link tree. */
.nav, .nav:link, .nav:visited {
   color: #000000;
   text-decoration: none;
}

a.nav:hover {
   color: #cc3333;
   text-decoration: underline;
}

/* Tables should show empty cells. */
table {
   empty-cells: show;
}

/* By default (td, body..) use verdana in black. */
body, td, th , tr {
   line-height: 140%;
   font-family: Tahoma, Arial, Helvetica, sans-serif;
   color: #aaa;
   font-size: 12px;
}

/* The main body of the entire forum. */
body {
   background: #545454;
   margin: 0px;
   padding: 0;
}

/* Input boxes - just a bit smaller than normal so they align well. */
input, textarea, button {
   color: #000000;
   font-family: verdana, sans-serif;
}

input, button {
   font-size: 90%;
}

textarea {
   font-size: 100%;
   color: #000000;
   font-family: verdana, sans-serif;
}

/* All input elements that are checkboxes or radio buttons. */
input.check {
}

/* Selects are a bit smaller, because it makes them look even better 8). */
select {
   font-size: 90%;
   font-weight: normal;
   color: #000000;
   font-family: verdana, sans-serif;
}

/* Standard horizontal rule.. ([hr], etc.) */
hr, .hrcolor {
   height: 1px;
   border: 0;
   color: #363636;
   background-color: #353535;
}

/* No image should have a border when linked */
a img {
   border: 0;
}

/* A quote, perhaps from another post. */
.quote {
   color: #797979;
   background-color: #333;
   border: 1px dashed #262626;
   margin: 1px;
   padding: 5px;
   font-size: 11px;
   line-height: 1.4em;
}

/* A code block - maybe even PHP ;). */
.code {
   color: #586F37;
   background-color: #232323;
   font-family: "courier new", "times new roman", monospace;
   line-height: 1.3em;
   /* Put a nice border around it. */
   border: 1px dashed #1b1b1b;
   margin: 1px auto 1px auto;
   padding: 1px;
   width: 99%;
   /* Don't wrap its contents, and show scrollbars. */
   white-space: nowrap;
   overflow: auto;
   /* Stop after about 24 lines, and just show a scrollbar. */
   max-height: 24em;
}

/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader {
   color: #999;
   text-decoration: none;
   font-style: normal;
   font-weight: bold;
   font-size: 11px;
   line-height: 1.2em;
   padding-bottom: 5px;
}

/* Generally, those [?] icons.  This makes your cursor a help icon. */
.help {
   cursor: help;
}

/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction {
   color: red;
}

/* The main post box - this makes it as wide as possible. */
.editor {
   width: 100%;
}

/* Highlighted text - such as search results. */
.highlight {
   background-color: yellow;
   font-weight: bold;
   color: black;
}

/* Alternating backgrounds for posts, and several other sections of the forum. */
.windowbg {
   background-color: #1d1d1d;
}

.windowbg2 {
   background-color: #1d1d1d;
}

.windowbg3 {
   background-color: #232323;
}

/* the today container in calendar */
.calendar_today {
   background-color: #292929;
}

/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */
.titlebg, tr.titlebg th, tr.titlebg td, .titlebg2, tr.titlebg2 th, tr.titlebg2 td {
   color: white;
   font-style: normal;
   background: #232323;
   padding-left: 10px;
   padding-right: 10px;
}

.titlebg, .titlebg a:link, .titlebg a:visited {
   color: #bbb;
   font-style: normal;
   text-transform: uppercase;
}

.titlebg a:hover {
   color: #404040;
}

/* same as titlebg, but used where bold text is not needed */
.titlebg2 a:link, .titlebg2 a:visited {
   color: #ccc;
   font-style: normal;
   text-decoration: underline;
}

.titlebg2 a:hover {
   text-decoration: underline;
}

/* This is used for categories, page indexes, and several other areas in the forum.
.catbg and .catbg2 is for boardindex, while .catbg3 is for messageindex and display headers*/
.catbg , tr.catbg td , .catbg3 , tr.catbg3 td, .catbg2 , tr.catbg2 td {
   background: url(images/custom/catbg.jpg) repeat-x;
   color: #dadada;
   padding-left: 10px;
   padding-right: 10px;
}

.catbg, .catbg2 {
   font-size: 14px;
   text-transform: uppercase;
}

.catbg3, tr.catbg3 td, .catbg3 a:link, .catbg3 a:visited {
   color: white;
   text-decoration: none;
}

.catbg a:link, .catbg a:visited , .catbg2 a:link, .catbg2 a:visited {
   color: #dadada;
   text-decoration: none;
}

.catbg a:hover, .catbg2 a:hover, .catbg3 a:hover {
   color: #e0e0ff;
}

/* This is used for tables that have a grid/border background color (such as the topic listing.) */
.bordercolor {
   background-color: #232323;
   padding: 0 3px 3px;
}

/* This is used on tables that should just have a border around them. */
.tborder {
   padding: 1px;
   background-color: #1b1b1b;
}

/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext {
   font-size: 11px;
}

.middletext {
   line-height: 18px;
   text-indent: 10px;
}

.normaltext {
   font-size: 16px;
}

.largetext {
   font-size: 18px;
}

/* Posts and personal messages displayed throughout the forum. */
.post, .personalmessage {
   width: 100%;
   overflow: auto;
   line-height: 1.3em;
}

/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature {
   width: 100%;
   overflow: auto;
   padding-bottom: 3px;
   line-height: 1.3em;
}

/* Sometimes there will be an error when you post */
.error {
   color: red;
}

/* definitions for the main tab, active means the tab reflects which page is displayed */
.maintab_first, .maintab_back, .maintab_last, .maintab_active_first, .maintab_active_back, .maintab_active_last, .mirrortab_first, .mirrortab_back, .mirrortab_last, .mirrortab_active_first, .mirrortab_active_back, .mirrortab_active_last {
   vertical-align: top;
   text-transform: uppercase;
}

.maintab_back, .maintab_active_back, .mirrortab_back, .mirrortab_active_back {
   text-decoration: none;
   font-size: 10px;
   padding: 5px;
}

.maintab_first,.mirrortab_first {
    display: none;
}

.maintab_back,.mirrortab_back {}

.maintab_last,.mirrortab_last {
   display: none;
}

.maintab_active_first, .mirrortab_active_first {
   display: none;
}

.maintab_active_back, .mirrortab_active_back {
   text-decoration: overline;
}

.maintab_active_last, .mirrortab_active_last {
   display: none;
}

/* how links behave in main tab. */
.maintab_back a:link, .maintab_back a:visited, .mirrortab_back a:link, .mirrortab_back a:visited {
   color: #dfdfdf;
   text-decoration: none;
}

.maintab_active_back a:link, .maintab_active_back a:visited, .mirrortab_active_back a:link, .mirrortab_active_back a:visited {
   color: #efefef;
   text-decoration: none;
   font-weight: bold;
}

.maintab_back a:hover, .maintab_active_back a:hover, .mirrortab_back a:hover, .mirrortab_active_back a:hover {
   color: #ababab;
   text-decoration: overline;
}

/* The AJAX notifier */
#ajax_in_progress {
   background: #32CD32;
   color: white;
   text-align: center;
   font-weight: bold;
   font-size: 18pt;
   padding: 3px;
   width: 100%;
   position: fixed;
   top: 0;
   left: 0;
}

#time {
   float: right;
   color: #aaa;
   padding: 10px 15px 7px 30px;
   background: url(images/custom/clock.png) 0 8px no-repeat;
}

#mainbg {
   background: #000 url(images/custom/bg.jpg) 50% 0 repeat-x;
}

#wrapper, #bot-wrap {
   width: 980px;
   margin: 0 auto;
   padding: 0;
width:95%;
}

#header {
   position: relative;
   height: 90px;
   overflow: hidden;
}

#logo, #logo a {
   position: absolute;
   left: 0;     
   display: block;
   width: 970px;
   height: 90px;
   background: url(images/custom/logo.png) no-repeat;
}

#toparea {
   background: #171717;
   padding: 2px 2px 0;
}

#userbar {
   background: #242424 url(images/custom/userbar-bg.png) 0 0 repeat-x;
   height: 38px;
}

#userarea {
   padding: 0 0 0 15px;
   font-size: 11px;
   width: 400px;
   height: 36px;
   color: #efefef;
}

#userarea a:link, #userarea a:visited {
   color: #ee5f70;
}

#ds-username {
   background: url(images/custom/userbox.png) 0 0 no-repeat;
   width: 120px;
   height: 20px;
   float: left;
   margin-top: 8px;
   margin-right: 15px;
}

#ds-password {
   background: url(images/custom/passbox.png) 0 0 no-repeat;
   width: 120px;
   height: 20px;
   float: left;
   margin-top: 8px;
   margin-right: 15px;
}

#ds-username input#usrnme, #ds-password input#psswrd {
   background: #fff;
   color: #000;
   padding: 2px 3px 0;
   border: none;
   margin: 3px 10px 0 8px;
   width: 100px;
   height: 13px;
   font-size: 11px;
}

#loginbutton {
   background: url(images/custom/loginbutton.png) no-repeat;
   width: 50px;
   height: 20px;
   border: none;
   padding: 0;
   margin: 8px 0 0;
   cursor: pointer;
}

#searcharea {
   float: right;
   margin: 8px 15px 0 15px;
   height: 20px;
   width: 180px;
   background: url(images/custom/searchbox.png) no-repeat;
   overflow: hidden;
}

#searcharea .searchbox {
   background: transparent;
   color: #000;
   padding: 0;
   border: none;
   margin: 5px 0 0 15px;
   width: 150px;
   height: 12px;
   font-size: 11px;
}

#bodyarea {
   background: #171717 url(images/custom/body-top.png) 50% 0 no-repeat;
   padding: 10px 10px 20px;
}

#toolbar {
   background: #2e2e2e url(images/custom/toolbar-bg.png) 0 0 repeat-x;
   height: 95px;
}

#kwick {
   width: 100%;
}

#kwick .kwicks {
   background: transparent;
   display: block;
   height: 95px;
   margin: 0px;
   padding: 0;
}

#kwick li {
   float: left;
   margin: 0;
   padding: 0;
   list-style: none;
}

#kwick .kwick {
   display: block;
   cursor: pointer;
   overflow: hidden;
   height: 95px;
   width: 120px;
}

#kwick .kwick span {
   display: none;
}

#kwick .opt0 {
   background: url(images/custom/ds-home.png);
   outline: none;
}

#kwick .opt1 {
   background: url(images/custom/ds-forum.png);
   outline: none;
}

#kwick .opt2 {
   background: url(images/custom/ds-gallery.png);
   outline: none;
}

#kwick .opt3 {
   background: url(images/custom/ds-chat.png);
   outline: none;
}

#kwick .opt4 {
   background: url(images/custom/ds-arcade.png);
   outline: none;
}

#kwick .opt5 {
   background: url(images/custom/ds-admin.png);
   outline: none;
}

#kwick .opt6 {
   background: url(images/custom/ds-logout.png);
   outline: none;
}

#kwick .opt7 {
   background: url(images/custom/ds-login.png);
   outline: none;
}

#kwick .opt8 {
   background: url(images/custom/ds-register.png);
   outline: none;
}

.clr {
   clear: both;
}

#linksbar {
   background: #212121 url(images/custom/linksbar-bg.png) repeat-x;
   height: 39px;
}

#nav {
   overflow: hidden;
   padding: 8px 0 0 20px;
}

#nav ul{
   list-style: none;
   margin: 0;
   padding: 0;
}

#nav li{
   float: left;
   margin-right: 15px;
}

#nav li a {
      float: left;
      color: #ababab;
   font-size: 11px;
      text-decoration: none;
   padding: 2px 8px 0;
   display: block;
}

#nav li a:hover {
      color: #777;
}

#nav li a.chosen {
      color: #333;
}

#nav li img {
   float: left;
}

#botarea {
   background: url(images/custom/bot.png) 0 0 repeat-x;
   height: 180px;
}

#footerarea {
   background: url(images/custom/footer.png) 0 0 repeat-x;
   height: 180px;
}

#footerarea .foot-left {
   float: left;
   color: #444;
   padding: 0 0 0 15px;
   font-size: 12px;
}

#footerarea .foot-right {
   float: right;
   background: url(images/custom/foot-r.png) 100% 0 no-repeat;
   height: 180px;
   width: 130px;
   margin: 0 -6px 0 0;
   clear: both;
}

#footerarea a:link, #footerarea a:visited {
   color: #595959;
}

.pathway {
   color: #dcdcdc;
   font-size: 11px;
   margin: 0;
   padding: 0px 10px 10px 5px;
}

.pathway a:link, .pathway a:visited {
   color: #656565;
   font-weight: normal;
   text-transform: none;
}

.pathway a:hover {
   color: #ccc;
   font-weight: normal;
}

.lastpost {
   color: #656565;
   font-size: 11px;
}

.windowbg4 {
   background: #232323;
   border: 1px dashed #1c1c1c;
   margin-bottom: 2px;
   padding: 4px;
   text-align: center;
   width: 94%;
}

please refer attachment untuk contoh forum saya.. logo tu saya nak pergi ketengah, dah cuba mcm2 cara tapi tak bleh.. tak keluar..

Saya dah cuba buat

   display: block;
    margin-left: auto;
    margin-right: auto }

masih tak keluar gambar..

2) Background.

bagaimana saya nak pastikan background forum tu sesuai untuk semua reso. ni apa yang saya lihat, background tu bertukar mengikut reso pulak.. harap dapat bantuan.. terima kasih..

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,921
  • Gender: Male
  • Busy mode is on.
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • ElkArte Malaysia
Re: Centerkan Image logo dan background..
« Reply #1 on: April 23, 2011, 06:53:53 AM »
Attachkan index.template.php untuk saya semak...

Offline digolbot

  • Semi-Newbie
  • *
  • Posts: 38
Re: Centerkan Image logo dan background..
« Reply #2 on: April 23, 2011, 09:40:50 AM »
Attachkan index.template.php untuk saya semak...

dah brader Ahrasis.. harap dapat membantu..

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,921
  • Gender: Male
  • Busy mode is on.
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • ElkArte Malaysia
Re: Centerkan Image logo dan background..
« Reply #3 on: April 23, 2011, 11:01:54 AM »
Logo awak kat sini css nyer:
Code: [Select]
#logo, #logo a {
   position: absolute;
   left: 0;     
   display: block;
   width: 970px;
   height: 90px;
   background: url(images/custom/logo.png) no-repeat;
}
Kena tukar jadikan center sama ada kat sini. Rasanya kena ubah position absolute tu kepada align center.

Atau dekat index.template.php kat sini:
Code: [Select]
<div id="logo">
<a href="'.$scripturl.'" title=""></a>
</div>



Offline digolbot

  • Semi-Newbie
  • *
  • Posts: 38
Re: Centerkan Image logo dan background..
« Reply #4 on: May 06, 2011, 03:51:21 AM »
tak boleh jugak.. kalau saya letak align center, logo tu hilang..

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,921
  • Gender: Male
  • Busy mode is on.
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • ElkArte Malaysia
Re: Centerkan Image logo dan background..
« Reply #5 on: May 06, 2011, 10:56:53 AM »
Camner awak buat. Cuba try macam ni:
Code: [Select]
#logo, #logo a {
   position: absolute;
   text-align: center;
   left: 0;     
   display: block;
   width: 970px;
   height: 90px;
   background: url(images/custom/logo.png) no-repeat;
}

Offline digolbot

  • Semi-Newbie
  • *
  • Posts: 38
Re: Centerkan Image logo dan background..
« Reply #6 on: May 31, 2011, 12:24:13 AM »
Camner awak buat. Cuba try macam ni:
Code: [Select]
#logo, #logo a {
   position: absolute;
   text-align: center;
   left: 0;     
   display: block;
   width: 970px;
   height: 90px;
   background: url(images/custom/logo.png) no-repeat;
}

kalau guna code atas ni, logo tu masih dikiri..

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,921
  • Gender: Male
  • Busy mode is on.
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • ElkArte Malaysia
Re: Centerkan Image logo dan background..
« Reply #7 on: June 03, 2011, 02:47:20 AM »
pelik jugak... sorilah tak leh nak membantu...

Offline digolbot

  • Semi-Newbie
  • *
  • Posts: 38
Re: Centerkan Image logo dan background..
« Reply #8 on: June 04, 2011, 11:59:30 AM »
pelik jugak... sorilah tak leh nak membantu...

ehehehe.. takpalah bro.. mungkin theme asal dia mmg lock kot.. takpa, small matter pun benda nih..

Offline ahrasis

  • SMF Hero
  • ******
  • Posts: 4,921
  • Gender: Male
  • Busy mode is on.
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • ElkArte Malaysia
Re: Centerkan Image logo dan background..
« Reply #9 on: October 04, 2012, 04:01:49 AM »
Camner awak buat. Cuba try macam ni:
Code: [Select]
#logo, #logo a {
   position: absolute;
   text-align: center;
   left: 0;     
   display: block;
   width: 970px;
   height: 90px;
   background: url(images/custom/logo.png) no-repeat;
}
Saya revisit topik ni. Saya silap dulu. Sepatutnya, saya suruh awak buang left: 0; Ini untuk nota pembaca sahaja.