Jump to content

Don't understand what I have done to cause <div>s to not display


Recommended Posts

I have made some change to cause two of my <div> to not display no matter what I do with the CSS.

And I don't understand what change has caused it.

#content and #navigation wont display no matter what I do.

 

Screen shot of the resulting web page is attached. The container, header structure and footer structure are there but no navigation div nor content div.

 

It may be that Expression web has stuffed something up in CSS but I can't see the problem.

 

Expression web is a pain in the arse with CSS if you put in php code in with it - it just keeps re-arranging the code and causing PHP syntax errors and CSS screw ups. I fixed all the PHP syntax errors but.......

 

HTML

<?php 		header('Content-Type: text/html; charset=utf8');		session_start();		include "Inventory.php";		include "Browser.php";?><!DOCTYPE html><html>	<head>		<meta charset="UTF-8">		<title>Home</title>		<?php include "Style.css"; ?>		<script type="text/javascript">		<?php						if (isOldBrowser()) 			{				include "html5shiv.js";			}					?>		</script>			</head>	<body>		<div id="container">			<?php include "Header.htm"; ?>					<div id="columns">							<?php include "NavigationStructure.htm"; ?>			    			    <div id="content">	    	    			    	<?php			    				    		function getHitCount()			    		{			    			$nCount = 0;			    						    			if ($file = fopen("Hits.txt", "r"))			    			{			    				$nCount = intval(fgets($file));			    				fclose($file);			    							    				if (!$_SESSION["HitLogged"] && ($file = fopen("Hits.txt", "w")))			    				{			    					fputs($file, strval($nCount + 1));			    					fclose($file);			    					$_SESSION["HitLogged"] = true;				    			}			    			}			    			return strval($nCount);			    		}			    			    	?>	    				        <p id="PageTitle">			        	<script type="text/javascript">			        		document.write(document.title);			        	</script>						<span style="float:right;">Hits:<?php echo getHitCount(); ?></span>			        </p>	    		<!--********************************************************************************************************************************************	********************************************************************************************************************************************	Start main content	********************************************************************************************************************************************    ********************************************************************************************************************************************-->				<p>sffsdgfdgdfgdfg</p>				<p>sffsdgfdgdfgdfg</p>				<p>sffsdgfdgdfgdfg</p>				<p>sffsdgfdgdfgdfg</p>				<p>sffsdgfdgdfgdfg</p>				<p>sffsdgfdgdfgdfg</p>				<p>sffsdgfdgdfgdfg</p>				<p>sffsdgfdgdfgdfg</p><!--********************************************************************************************************************************************	********************************************************************************************************************************************	End main content	********************************************************************************************************************************************    ********************************************************************************************************************************************-->   			    	</div>			</div>	    			<?php include "Footer.htm"; ?>		</div>	</body></html>

CSS

	/**********************************************************************************************************************/	/**********************************************************************************************************************/	/** Page structure                                                                                                   **/	/**********************************************************************************************************************/	/**********************************************************************************************************************/	h1 {		display:block;	    font-family:<?php echo $_SESSION["ContentsFont"]; ?>;	    font-size:3em;	    font-weight:bold;	    color:<?php echo $_SESSION["ContentsFontColor"]; ?>;	    margin:12px;	    text-decoration:underline;	}		h2 {		display:block;		position:relative;	    font-family:<?php echo $_SESSION["ContentsFont"]; ?>;	    font-size:xx-large;	    font-weight:bold;	    color:<?php echo $_SESSION["ContentsFontColor"]; ?>;	    margin:12px;	    text-decoration:underline;	}		h3 {		display:block;	    font-family:<?php echo $_SESSION["ContentsFont"]; ?>;	    font-size:x-large;	    font-weight:bold;	    color:<?php echo $_SESSION["ContentsFontColor"]; ?>;	    margin:12px;	    text-decoration:underline;	}		h4 {		display:block;	    font-family:<?php echo $_SESSION["ContentsFont"]; ?>;	    font-size:large;	    font-weight:bold;	    color:<?php echo $_SESSION["ContentsFontColor"]; ?>;	    margin:12px;	    text-decoration:underline;	}		h5 {		display:block;	    font-family:<?php echo $_SESSION["ContentsFont"]; ?>;	    font-size:medium;	    font-weight:bold;	    color:<?php echo $_SESSION["ContentsFontColor"]; ?>;	    margin:12px;	    text-decoration:underline;	}		hr{	    color:#<?php echo $_SESSION["ContainerColor"]; ?>;	    border-style:outset;	    border-width:medium;	    width:98%;	}			p {	    font-family:<?php echo $_SESSION["ContentsFont"]; ?>;	    font-size:medium;	    font-weight:normal;	    color:<?php echo $_SESSION["ContentsFontColor"]; ?>;	    margin:12px	}			ul {	    display:block;	    margin:12px	}	li {	    font-family:<?php echo $_SESSION["ContentsFont"]; ?>;	    font-size:medium;	    font-weight:normal;	    color:<?php echo $_SESSION["ContentsFontColor"]; ?>;	    margin:12px	}		#container {			behavior: url(CSSPie/PIE.htc);			display:block;			position:relative;	    	width:<?php echo $nContainerWidth; ?>px;	    	background-color:#<?php echo $_SESSION["ContainerColor"]; ?>;	    	font-family:<?php echo $_SESSION[ContainerFont]; ?>;	    	font-size:small;	    	color:<?php echo $_SESSION["ContentsFontColor"]; ?>;	    	text-align:left;	    	border-radius:5px;	    	border-top-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>;	    	border-left-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>;	    	border-bottom-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>;	   		border-right-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>;	    	border-left-style: solid;	    	border-right-style: solid;	    	border-top-style: solid;	    	border-bottom-style: solid;	}	#columns{		display:none;		width:100%;	    min-height:<?php echo $strContainerMinHeight; ?>;		margin-top:0px;		clear:both'			    border-style:solid;		border-width:thin;	    border-color:yellow yellow yellow yellow;	}	#navigation{	    display:block;	    /*	    position:relative;	    float:left;	    width:<?php echo $nNavigationWidth; ?>px;	    clear:right;	    margin-top:8px;*/	    border-style:solid;	    border-width:thin;	    border-color:red red red red;	}		#content{	    behavior: url(CSSPie/PIE.htc);	    display:block;/*	    position:relative;	    background-color:<?php echo $_SESSION["ContentsColor"]; ?>;	    float:left;	    width:80%;	    font-family:<?php echo $_SESSION["ContentsFont"]; ?>;	    font-size:small;	    color:black;	    text-align:left;	    border-radius:5px;	    border-top-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>;	    border-left-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>;	    border-bottom-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>;	    border-right-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>;	    min-height:<?php echo $strContainerMinHeight; ?>;	    border-left-style: solid;	    border-right-style: solid;	    border-top-style: solid;	    border-bottom-style: solid;*/    }	#footer {	    display:block;	    position:relative;	    clear:both;	    font-family:<?php echo $_SESSION[ "ContainerFont"]; ?>;	    font-size:medium;	    color:#<?php echo $_SESSION["ContainerFontColor"]; ?>;	    text-align:left;	    padding-left:260px;	    line-height:50px;	    vertical-align:middle;	    height:50px;	    margin-bottom:12px;	    	    border-style:solid;	    border-width:thin;	    border-color:red red red red;	}			#header {		display:block;		position:relative;		top:-10px;	    width:100%;	    height:<?php echo $nHeaderHeight; ?>px;	    border-style:none;	    border-width:thin;	}			#heading {		behavior: url(CSSPie/PIE.htc);		display:block;		position:relative;		float:left;	    font-family:<?php echo $_SESSION["MainHeadingFont"]; ?>;	    font-size:4.5em;	    font-weight:bold;	    color:#<?php echo $_SESSION["MainHeadingColor"]; ?>;		text-shadow:3px 3px 0px #<?php echo $_SESSION["MainHeadingShadowColor"]; ?>;		width:<?php echo $nHeadingWidth; ?>px;		height:100%;		vertical-align:middle;		line-height:100%;				border-style:none;		border-width:thin;	}		#motto{		behavior: url(CSSPie/PIE.htc);		display:block;		position:relative;	    font-family:<?php echo $_SESSION["MainHeadingFont"]; ?>;	    font-size:xx-large;	    font-weight:bold;	    color:#<?php echo $_SESSION["MainHeadingColor"]; ?>;		text-shadow:2px 2px 0px #<?php echo $_SESSION["MainHeadingShadowColor"]; ?>;		height:36px;		line-height:36px;		margin-top:10px;		margin-bottom:10px;		border-style:none;		border-width:thin;	}		#ABN{		behavior: url(CSSPie/PIE.htc);		display:block;		position:relative;	    font-family:<?php echo $_SESSION["ContainerFont"]; ?>;	    font-size:medium;	    font-weight:bold;	    color:#<?php echo $_SESSION["ContainerFontColor"]; ?>;		height:25px;		line-height:25px;		text-align:right;		border-style:none;		border-width:thin;	}		#HeaderImage{		behavior: url(CSSPie/PIE.htc);		display:block;		float:left;	    border-radius:5px;		border-style:solid;	    border-top-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>;	    border-left-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>;	    border-bottom-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>;	    border-right-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>;		width:<?php echo $nContainerWidth - $nNavigationWidth - $nHeadingWidth + 26; ?>px;		height:<?php echo $nHeaderImageHeight; ?>px;		margin-top:auto;		margin-bottom:auto;		overflow:hidden;		margin-left:10px;	}		#symbol{		behavior: url(CSSPie/PIE.htc);		display:block;		float:left;		margin-left:10px;		margin-right:10px;		height:100%;		line-height:100%;		vertical-align:middle;		overflow:hidden;						border-style:none;		border-width:thin;		border-color:black;	}	#PageTitle {		behavior: url(CSSPie/PIE.htc);	    display: block;	    color:#<?php echo $_SESSION["PageHeadingFontColor"]; ?>;	    font-family:<?php echo $_SESSION["PageHeadingFont"]; ?>;	    font-size:42px;	    font-weight:bold;		text-shadow:2px 2px 0px #<?php echo $_SESSION["MainHeadingShadowColor"]; ?>;	}
Link to post
Share on other sites

I'm not seeing a screenshot; could you maybe post a link to your webpage? Sometimes it's easier to get an idea for things if a person can see them and work with them.

 

Is Expression web a program of some sort? A lot of that PHP looks questionable. I'm not positive, but I don't think any code is supposed to come before your !DOCTYPE declaration.

Link to post
Share on other sites

It is bloody Epression Web causing these problems.

 

Even though I am not using Expression Web to edit my .css file it still keeps trying to re-format the code.

 

Often when I try to save the .css in notepad.exe I get a message saying the file has changed and do I want to re-load it.

 

Occasionally I have hit the wrong response and then I find all my css/php code $%&@# up.

 

Then it takes me ages to get it all working again.

 

The single quote was probably a result of this.

 

I ended up having to remove all the CSS code and then put it back one bit at a time until I found all the damn errors that expression web had introduced.

 

Windows notepad.exe has it own problems. e.g. poor undo/redo

 

I have since discovered notepad plus and notepad2.

Edited by gregaryb
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...