ทำยังไงให้ LOGO มันอยู่ตรงกลางค่ะ

เริ่มโดย laddawanna, 14 พฤศจิกายน 2010, 11:43:24

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

laddawanna

มีปัญหานิดหน่อยค่ะ คือเขียนโค้ดไม่เป็น
http://www.lowchiangmai.com/

LOGO ดั้งเดิมของมันจะอยู่ตรงกลางอ่ะค่ะ พออัพอันใหม่ซึ่งใหญ่กว่าอันเดิมมา มันก็ดันเอียงขวาอย่างที่เห็นอ่ะค่ะ ต้องทำยังไงเหรอคะ

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php elegant_titles(); ?></title>
<?php elegant_description(); ?>
<?php elegant_keywords(); ?>
<?php elegant_canonical(); ?>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/jquery.fancybox-1.2.6.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
<!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/ie6style.css" />
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/DD_belatedPNG_0.0.8a-min.js"></script>
    <script type="text/javascript">DD_belatedPNG.fix('img#logo, .slider_image img, .banner, .banner .readmore, .wrap .image img, .thumb div .image img, div.avatar span.overlay');</script>
<![endif]-->
<!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/ie7style.css" />
<![endif]-->
<script src="<?php bloginfo('template_directory'); ?>/js/fancybox.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/easing.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/cufon-yui.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/superfish.js" type="text/javascript"></script>
</head>
<body>
<div class="wrapper">
  <a href="<?php bloginfo('url'); ?>"><?php $logo = (get_option('simplepress_logo') <> '') ? get_option('simplepress_logo') : get_bloginfo('template_directory').'/images/logo.png'; ?>
   <img src="<?php echo $logo; ?>" alt="Logo" id="logo"/></a>
   
    <div id="navwrap">
        <span class="nav_top"></span>
      <?php $menuClass = 'nav superfish';
        $primaryNav = '';
        if (function_exists('wp_nav_menu')) {
            $primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'echo' => false ) );
        };
        if ($primaryNav == '') { ?>
            <ul class="<?php echo $menuClass; ?>">
                <?php if (get_option('simplepress_home_link') == 'on') { ?>
                    <li <?php if (is_home()) echo('class="current_page_item"') ?>><a href="<?php bloginfo('url'); ?>"><?php _e('Home','SimplePress') ?></a></li>
                <?php }; ?>
               
                <?php show_page_menu($menuClass,false,false); ?>
                <?php show_categories_menu($menuClass,false); ?>               
            </ul> <!-- end ul.nav -->
        <?php }
        else echo($primaryNav); ?>
       
        <?php global $default_colorscheme, $shortname; $colorSchemePath = '';
        $colorScheme = get_option($shortname . '_color_scheme');
        if ($colorScheme <> $default_colorscheme) $colorSchemePath = strtolower($colorScheme) . '/'; ?>
        <br class="clear" />
        <span class="nav_bottom"></span>
    </div><!-- #navwrap -->

นี่โค้ดอ่ะค่ะ รบกวนด้วยนะคะ

BabyKoala

ในโค้ดยังไม่เห็นไฟล์ชื่อ logo เลยอะครับ หรือเข้าใจผิดหว่า :P
Thaiseoboard สังคมแห่งการแบ่งปัน:)

BeerSkz

อ้างถึงจาก: BabyKoala ใน 14 พฤศจิกายน 2010, 11:46:29
ในโค้ดยังไม่เห็นไฟล์ชื่อ logo เลยอะครับ หรือเข้าใจผิดหว่า :P

อยู่ใน css ป่าว :wanwan019:

kornchai

#3
อ้างถึงจาก: laddawanna ใน 14 พฤศจิกายน 2010, 11:43:24
มีปัญหานิดหน่อยค่ะ คือเขียนโค้ดไม่เป็น
[www.lowchiangmai.com/]http://www.lowchiangmai.com/
[/ftp]
LOGO ดั้งเดิมของมันจะอยู่ตรงกลางอ่ะค่ะ พออัพอันใหม่ซึ่งใหญ่กว่าอันเดิมมา มันก็ดันเอียงขวาอย่างที่เห็นอ่ะค่ะ ต้องทำยังไงเหรอคะ

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php elegant_titles(); ?></title>
<?php elegant_description(); ?>
<?php elegant_keywords(); ?>
<?php elegant_canonical(); ?>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/jquery.fancybox-1.2.6.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
<!--[if lt IE 7]>
   <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/ie6style.css" />
   <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/DD_belatedPNG_0.0.8a-min.js"></script>
   <script type="text/javascript">DD_belatedPNG.fix('img#logo, .slider_image img, .banner, .banner .readmore, .wrap .image img, .thumb div .image img, div.avatar span.overlay');</script>
<![endif]-->
<!--[if IE 7]>
   <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/ie7style.css" />
<![endif]-->
<script src="<?php bloginfo('template_directory'); ?>/js/fancybox.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/easing.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/cufon-yui.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/superfish.js" type="text/javascript"></script>
</head>
<body>
<div class="wrapper">
 <center><a href="<?php bloginfo('url'); ?>"><?php $logo = (get_option('simplepress_logo') <> '') ? get_option('simplepress_logo') : get_bloginfo('template_directory').'/images/logo.png'; ?>
   <img src="<?php echo $logo; ?>" alt="Logo" id="logo"/></a></center>

   
   <div id="navwrap">
       <span class="nav_top"></span>
      <?php $menuClass = 'nav superfish';
       $primaryNav = '';
       if (function_exists('wp_nav_menu')) {
           $primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'echo' => false ) );
       };
       if ($primaryNav == '') { ?>
           <ul class="<?php echo $menuClass; ?>">
               <?php if (get_option('simplepress_home_link') == 'on') { ?>
                   <li <?php if (is_home()) echo('class="current_page_item"') ?>><a href="<?php bloginfo('url'); ?>"><?php _e('Home','SimplePress') ?></a></li>
               <?php }; ?>
               
               <?php show_page_menu($menuClass,false,false); ?>
               <?php show_categories_menu($menuClass,false); ?>               
           </ul> <!-- end ul.nav -->
       <?php }
       else echo($primaryNav); ?>
       
       <?php global $default_colorscheme, $shortname; $colorSchemePath = '';
       $colorScheme = get_option($shortname . '_color_scheme');
       if ($colorScheme <> $default_colorscheme) $colorSchemePath = strtolower($colorScheme) . '/'; ?>
       <br class="clear" />
       <span class="nav_bottom"></span>
   </div><!-- #navwrap -->

นี่โค้ดอ่ะค่ะ รบกวนด้วยนะคะ

ก๊อบตรงสีแดงไปแทนที่อันเก่าครับ
[direct=https://www.facebook.com/beautysbuddy/]Colourpop พร้อมส่ง[/direct][direct=https://www.facebook.com/beautysbuddy]ขาย Colourpop พร้อมส่ง[/direct]
[direct=https://www.facebook.com/beautysbuddy/]Preorder Colourpop[/direct][direct=https://www.facebook.com/beautysbuddy]พรีออเดอร์ Colourpop[/direct]

DollarsMafia

ผมเพิ่งดูตอน 8:20 นะ ไม่รู้แก้อะไรไปบ้างแล้ว
แต่เท่าที่ผมเห็น ต้องแก้ที่ CSS นะครับ
ไฟล์ http://www.lowchiangmai.com/wp-content/themes/SimplePress/style.css
ตรง

#logo { border: none; margin: 73px auto 24px 300px; clear: both; }


เอา margin ออก



#logo { border: none; clear: both; }


Joejoe

แก้ที่ไฟล์ css

http://www.lowchiangmai.com/wp-content/themes/SimplePress/style.css

ตรงนี้ครับ

#logo { border: none; margin: 73px auto 24px 300px; clear: both; }


เปลี่ยนเป็น

#logo { border: none; margin: 73px auto 24px 0px; clear: both; }