1 Replies - 596 Views - Last Post: 14 April 2011 - 12:42 PM

#1 erburrell  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 145
  • Joined: 22-December 09

css styling not showing up.

Posted 14 April 2011 - 12:15 PM

All,

I have a web page I'm building, and the styling is not showing up as I would expect. In this case, I have several .php pages I am including. The topNav page has styling that works great, but the side nav doesn't work at all. Any help would be greatly appreciated. The code is below. Was looking back at it, and realised that my "mainContent" div and footer aren't showing up at all now.

Ed.

my top and side nav css:
/* Top Navigation Styles */
#topNav {
    background-color:transparent;
    top:103px;
    left:5px;
    padding:2px;
    margin-left:1px;
    width: 100%;
}
#topNav ul {
    margin:1px;
    padding:2px;
    list-style:none;
    font-size:large;
    color:#FFFFFF;
}

#topNav li {
    display:inline;
    text-align:center;
}

#topNav li a {
    text-decoration:none;
    padding:5px, 0;
    background-image:url("../images/topNavButton.png");
    background-repeat:repeat-x;
    color:#FFFFFF;
    width: 100px;
    height:25px;
    float:left;
}

/* Side Navigation Styles */
#sideNav {
    background-color:transparent;
    position:absolute;
    top:128px;
    left:10px;
    width:150px;
}

#sideNav ul {
    margin:1px;
    padding:2px;
    list-style:none;
    font-size:large;
    color:#FFFFFF;
}

#sideNav li {
    
    text-align:left; 
}

#sideNav li a {
    text-decoration:none;
    padding:5px, 0;
    background-image:url("../images/topNavButton.png");
    background-repeat:repeat-x;
    color:#FFFFFF;
    width: 100px;
    height:25px;
    float:left;
}



my top nav include file:
<div id="topNav">
    <ul>
        <li><a href="http://localhost:63363/index.php">Home</a></li>
        <li><a href="http://localhost:63363/index.php">Store</a></li>
        <li><a href="http://localhost:63363/index.php">Blog</a></li>
        <li><a href="http://localhost:63363/index.php">Forums</a></li>
    </ul>
</div>


my side nav include file:
<div id="sideNav">
<?php
include ($level."/lib/store.php");
include ($level."/lib/sqlConnect.php");

$myCats = getAllCategories();
echo "<br/><ul>";
foreach($myCats as $x) {
    echo "<li><a href=\"http://localhost:63363/pages/categories/" . $x->getName() . ".php\" >" . $x->getName() . "</a></li>";
}   
echo "</ul>";
?>
</div>


and my index page code.
<?php 
$level=".";
include ($level."/includes/defaultHeader.php");
include ($level."/includes/defaultTopNav.php");
include ($level."/includes/defaultSideNav.php");
include ($level."/lib/store.php");
include ($level."/lib/sqlConnect.php");
?>


<div id="mainContent">
    <br/>

    <p>Welcome to the internet home for the Man Outdoors.  Soon, we will be adding products
        to the site that will help you with your everyday activities as you head into the outdoors.</p>
        
    <p> We will be providing you with a blog from our owners, the Barnett Brothers.  Here, they will discuss everything from
        hunting and fishing to lawn care.</p>
        
    <p>For even more information, you will be able to tap into our member forums and discuss any outdoor activities you have.</p>
        
    <p>Stay tuned, and we hope to see you again soon.</p>

</div>

<?php include("./includes/defaultFooter.php") ?>


Is This A Good Question/Topic? 0
  • +

Replies To: css styling not showing up.

#2 erburrell  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 145
  • Joined: 22-December 09

Re: css styling not showing up.

Posted 14 April 2011 - 12:42 PM

Ok, now I'm an ideeot! Forgot I had changed the file to a .php instead of css. was working on the old file.

Ed :blush:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1