Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    1
    Thanks
    2
    Thanked 0 Times in 0 Posts

    HELP! I need some php help...

    I need some coding help! I have a website and have coded the following (see below). It looks fine on the main page but as soon as i click a category the font goes smaller?! I have a feeling it's either a missing </div> tag or one too many?!?! I have no idea though and can't seem to find what it is.

    Would really appreciate any help!
    J



    PHP Code:
    <!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 bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php ?> <?php wp_title(); ?></title>

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />


    <link rel="icon" href="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/favicon.ico" />
    <link rel="shortcut icon" href="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/favicon.ico" />

    <?php wp_head(); ?>

    </head>
    <body>


    <div id="headerlinks">
    <font size="2"><font face="Georgia"><?php get_useronline(); ?><strong> </strong><a href="http://turntothebside.com/wp-login.php?action=register">Sign Up!</a><strong> // </strong> 
    <?php wp_loginout(); ?>
    </font></font>
    </div>


    <div id="head" class="clearfloat">

    <div class="clearfloat">
        <div id="logo" class="center">
          <div align="center" width="960" height="300" >
    <p align="center" style="position:relative;"><img src="<?php echo get_option('home'); ?>/newimages/headerlogo.gif" alt="B-Side Empire" /><div id="header_dot"><span align="left" style="position:absolute; bottom:25px; left:-240px;" ><img src="/newimages/header_right_bg.gif" alt="Dot" /></p>
    </div>
    <div id="header_text"><span align="right" style="position:absolute; bottom:20px; left:240px;" >A creative agency dedicated to <strong>supporting</strong> and <strong>promoting</strong> student artists.</span>


    </div>
    </div>
    </div>


    <div id="socialnetworking" class="clearfloat">
    <span align="right";><a href="http://www.facebook.com/pages/B-Side-Empire/47015956481?ref=ts"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/icons/facebook.png" alt="Facebook" /></a><a href="http://www.flickr.com/photos/turntothebside/"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/icons/flickr.png" alt="Flickr" /></a><a href="http://www.myspace.com/turntothebside"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/icons/myspace.png" alt="Myspace" /></a><a href="http://turntothebside.com/?feed=rss2"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/icons/feed.png" alt="RSS" /></a><a href="http://www.twitter.com/turntothebside"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/icons/twitter.png" alt="twitter" /></a><a href="http://www.vimeo.com/turntothebside"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/icons/vimeo.png" alt="Vimeo" /></a><a href="http://www.youtube.com/turntothebside"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/icons/youtube.png" alt="you tube" /></a> </span>
    </div>


    <br />


    <div id="navbar" class="clearfloat">
    <ul id="page-bar" class="left clearfloat">

    <li><a href="<?php echo get_option('home'); ?>/">Home</a></li>

    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>

    </ul>

    <?php include (TEMPLATEPATH '/searchform.php'); ?>

    <?php if (!is_paged()) { ?> 
    <ul id="navbar-categories" class="left clearfloat">
    <?php 
    $currentcats 
    = array();
    if(
    is_category()) {
    $currentcats[] = '';
    } else {
    foreach((
    get_the_category()) as $category) { 
        
    $currentcats[] = $category->cat_ID
    }}

    $display_categories = array(16,3,4,5,6,7,8,9,10,11); $i 1$cat single_cat_title(''FALSE);
        foreach (
    $display_categories as $category) { $cat_name get_cat_name($category); ?>

        <li id="navbar-cat-<?php echo $i?>" class="category<?php if(in_array($category$currentcats) || ($cat_name == $cat)) { echo " active"; } ?>">
            <?php $my_query = new WP_Query("showposts=1&cat=$category"); ?>
            <a href="<?php echo get_category_link($category);?>"><span class="cat_title"><?php echo $cat_name?></span></a>

        </li>

        <?php $i++; ?>
            <?php ?>
    </ul>
    <?php ?>
    </div>

    </div>

    <div id="page" class="clearfloat">

  • #2
    Regular Coder
    Join Date
    Mar 2009
    Location
    United Kingdom
    Posts
    161
    Thanks
    6
    Thanked 28 Times in 28 Posts
    Yeah this is a HTML/CSS issue not a PHP but anyways, the following tag hasnt been closed.

    <div id="head" class="clearfloat">

  • Users who have thanked Killermud for this post:

    greenballoons (09-07-2010)

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Anything for output control such as formatting and display is always an HTML/CSS issue. The limitations that PHP has on this is to control if that element exists in the first place.

    Moving from PHP to HTML/CSS. OP, in the future please use more descriptive titles of what the issue is, rather than a generic "HELP" title. Please refer to section 2 of the guidelines here: http://www.codingforums.com/postguide.htm
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • Users who have thanked Fou-Lu for this post:

    greenballoons (09-07-2010)


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •