View Full Version : HELP! I need some php help...

09-06-2010, 02:35 PM
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!

<!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(); ?>


<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(); ?>

<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 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 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>

<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='); ?>


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

<?php if (!is_paged()) { ?>
<ul id="navbar-categories" class="left clearfloat">
$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>


<?php $i++; ?>
<?php } ?>
<?php } ?>


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

09-06-2010, 03:44 PM
Yeah this is a HTML/CSS issue not a PHP but anyways, the following tag hasnt been closed.

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

09-06-2010, 07:26 PM
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