Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Simple PHP Application Wrapping Up The Project Deploying The Site

CSS is now broken pt. 2

After uploading files to the web host (000webhost.com) my CSS is no longer working. The rest of the site is working fine. The website is a mix of a CSS tutorial on treehouse & this project. I tried commenting out the media queries section.. no luck! Any suggestions would be much appreciated!

index.php <?php $pageTitle = "Popsyoga"; include("inc/header.php"); ?> <div class="main-banner"> <h1>This is our Main Heading!</h1> <p>acon ipsum dolor sit amet chicken pork ground round brisket corned beef ball tip </p> <div class="primary-content col"> <h2>Primary Content</h2> <p>Bacon ipsum dolor sit amet chicken pork ground round brisket corned beef ball tip shank tail salami filet mignon ham hock pork belly venison shankle. Pig kielbasa drumstick sausage pork chop boudin. Chicken t-bone salami pork chop, beef ribs kevin ham tri-tip beef venison biltong brisket.</p> <p>Venison strip steak meatball chicken, brisket prosciutto sirloin. Capicola drumstick brisket tri-tip salami. Chicken beef jerky, tail turkey prosciutto cow ham sirloin boudin tenderloin. Meatloaf tri-tip turducken brisket andouille, pork belly corned beef fatback hamburger.</p> </div> <div class="secondary-content col"> <h3>Secondary Content</h3> <p>Strip steak tenderloin kevin swine meatloaf capicola, doner beef turducken pancetta corned beef pork loin shoulder.</p> <hr> <p>Pork filet mignon leberkas, tail swine venison pancetta turkey shoulder brisket chalkers likes hamburgers.</p> </div>

<?php include("inc/footer.php"); ?>

/* Page Styles ============= */

body { font: normal 1.1em/1.5 sans-serif; color: #222; background-color: #edeff0; } html, body, .main-wrapper, .col { height: 100%; } /* remove to add background image .main-wrapper { width: 90%; margin: auto;*/ }

ul, li { list-style: none; margin: 0; padding: 0; }

*{ box-sizing: border-box; }

form {width: 375px; margin: 34px auto;} form tr { border: 1px solid #CCC; background: #f4f3f2; } form table {width: 375px; margin-bottom: 16px;} form th { width: 85px; border-right: 1px solid #CCC; vertical-align: middle; padding: 8px; } form td { padding: 15px 15px; } form td select, form td input, form td textarea { width: 100%; } form input[type="submit"] { width: 375px; text-align: center; border: 1px solid #8e8e46; background: #9c9f4e; color: #FFF; border-radius: 2px;
font-size: 14px; text-transform: uppercase; }

.section.shirts ul.products li { display: inline-block; list-style: none; border: 1px solid #e3e1e0; border-radius: 2px; width: 202px; text-align: center; text-transform: lowercase; padding: 14px; background: #f0eeed; margin: 0 0 17px 17px; position: relative; left: -17px; }

.store-picture { float: left; width: 460px; text-align: center; border: 1px solid #d9d9d9; padding: 14px; background: #f0eeed;
} .store-picture span { background: white; display: block; width: 100%; padding: 36px 0 61px; } .store-picture img {width: 292px;}

.section.page p {width: 375px; /margin-left: auto; margin-right: auto;/ } .section.page .store-details h1 .price {color: #5fcf80; padding-right: 10px; font-size: 34px;}

/Layout Element Colors ====================/

.main-header {background-color: #384047;} .main-logo {background-color: #5fcf80;} .main-nav li {background-color: #3f8abf;} .primary-content {background-color: #caebf6;} .secondary-content {background-color: #bfe3d0;} .main-footer {background-color: #b7c0c7;}

/Header, Banner and Footer Layout =================================/

.main-header { padding: 20px; display: table; width: 100%; min-height: 150px; } .main-logo, .main-nav, .main-nav li { display: inline-block; }

.main-nav li.on a { text-decoration: underline; }

.main-banner { background-color: #ebedee; text-align: center; padding: 35px 15px; }

.main-nav{ padding-left: 50px; } .main-logo, .main-nav li { border-radius: 5px;


.main-logo, .main-nav{ display: table-cell; vertical-align: middle; }

.main-nav li { margin-right: 10px; } .main-logo { width: 220px; }

.main-logo a, .main-nav a { color: white; text-decoration: none; display: block; text-align: center; padding: 10px 20px; } .main-footer{ text-align: center; padding: 20px; }

/Column Layout ===============/ .col { display: inline-block; padding: 20px; margin-right: -5px; vertical-align: top; } .primary-content{ width: 60%; } .secondary-content{ width: 40%; }

/Media Queries ===============/

/*@media (max-width: 768px) { .main-logo, .main-nav, .main-nav li, .col { display: block; width: initial; height: initial; margin: initial; } .main-nav { padding-left: initial; } .main-nav li { margin-top: 15px; } } */

Thomas King
Thomas King
15,197 Points

Can you copy the <link> tag code you are using in the header.php include you are using? Or even a chunk of the code snippet from the include?

Hi Thomas,

Thanks for the response!

Here is what I have in the header.php file.

<html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="author" content="Cornelis "Neil" Fiedler"> <meta name="keywords" content="MET CS601 'Boston University' 'Metropolitan College'">

<title><?php echo $pageTitle; ?></title>

<!-- You may or not not use jQuery; but, here just to show as example --> <script src="http://code.jquery.com/jquery-2.1.3.js"></script> <script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js"></script>

<link href="css/normalize.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet">



</head> <body> <div class="main-wrapper">
<header class="main-header"> <h1 class="main-logo"><a href="index.php">Popsyoga</a></h1> <ul class="main-nav"> <li class="store <?php if ($section == "store") {echo "on";} ?>"><a href="store.php">Store</a></li> <li class="contact <?php if ($section =="contact") {echo "on"; } ?>"><a href="contact.php">Contact</a></li> <li class="about <?php if ($section =="about") {echo "on";} ?>"><a href="about.php">About Neil</a></li> </ul> </header>

Thomas King
Thomas King
15,197 Points

Neil Fiedler - Sorry for the confusion, I meant what is between the HEAD tags in the header.php file you are including in your index page.

How are you linking the CSS stylesheet to your webpage in your markup?