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
    Feb 2014
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Nav background color changed when added flash in header, cant change back.

    So I have my nav as a sidebar div and I had my original .gif header setup, also I have a different one for the mobile version. So, I changed the desktop header and replaced it with an .swf flash file and it seems to not go together right. I have it in place and it looks fine but when I view it in chrome, the background color of the header seems to cover only the nav section of the sidebar div. I cant figure out why. I tried setting the nav background color in my css file but that only spread out the color to around the nav links. The wrong background color still borders the nav color. Here is my HTML code:

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset=utf-8>
    <title>JavaJam Coffee House Menu</title>
    <link href="javajam.css" rel="stylesheet" type="text/css">
    
    <link href="javajammobile.css" rel="stylesheet" media="only screen and (max-device-width:480px)">
    
    <meta name="viewport"
    content="width=device-width, initial-scale=1.0">
    
    
    </head>
    
    <body>
    
    <div id="wrapper">
    
    <div id="header">
    
    <embed type="application/x-shockwave-flash"
    src="javalogo.swf" quality="high"
    width="620" height="117"
    title="javalogo">
    
    <h1 id="header">JavaJam Coffee House</h1>
    
    </div>
    
    <div id="nav">
    
    <ul>
    
    	<li><a href="index.html">Home</a></li> 
        <li><a href="menu.html">Menu</a></li>  
    	<li><a href="music.html">Music</a></li>
        <li><a href="jobs.html">Jobs</a></li>
    
    </ul>
    
    </div>
    
    <div id="content">
    
    <table>
    
    <thead>
    	
        <tr>
        
            <th><strong>Just Java</strong></th>
        	
            <td>Regular house blend, decafinated coffee, or flavor of the            day<br>Endless Cup $2.00</td>
        </tr>
        
        </thead>
        
        <tbody>
        
        <tr>
        
        	<th><strong>Cafe au Lait</strong></th>
        	
            <td>House blended coffee infused into a smooth,            steemed milk<br>Single $2.00 Double $3.00</td>
        </tr>
        
        </tbody>
        
        <tfoot>
        
        <tr>
        
            <th><strong>Iced Cappuccino</strong></th>
            
            <td>Sweetened espresso blended with ice cold milk and served in            a chilled glass<br>Single $4.75 Double $5.75</td>     
        </tr>  
        
        </tfoot>     
    
    </table>
    
    12312 Main Street<br>Mountain Home, CA 93923<br>
    
    <a id="mobile" href="tel:888-555-5555">1-888-555-5555</a>
    
    <span id="desktop">1-888-555-5555</span>
    
    
    </div>
    
    <!--br-->
    
    <div id="footer">JavaJam Copyright &copy; 2013 Coffee House <br><a href="mailto:bwhite08@northshore.edu">bwhite08@northshore.edu</a>
    
    </div>
    
    </div>
    
    </body>
    </html>
    HERE IS MY CSS DESKTOP CODE:

    Code:
    @charset "utf-8";
    
    body 		{background-image:url(background.gif);
    			 background-color:#ffffcc;
    			color:#000000;
    			font:Verdana, Geneva, sans-serif;}	
    
    #wrapper    {width:700px;
    			 margin-left:auto;
    			 margin-right:auto;
    			 background-color:#ffffcc;
    			 -webkit-box-shadow: 5px 5px 5px #828282;
    			 -moz--box-shadow: 5px 5px 5px #828282;
    			 -box-shadow: 5px 5px 5px #828282;}
    			 
    #header		{
    			 background-position:center;
    			 background-repeat:no-repeat;
    			 height:117px;
    			 background-color:#ccaa66;
    			 text:#oooooo;
    			 text-align:left;
    			 margin:0;}
    			 
    #header h1 {text-indent:-99999px;
    			margin: 0;}
    			 
    #nav		{float:left;
    			 background-color:#ffffcc;
    			 text-align:center;
    			 width:100px;
    			 padding-top:10;
    			 margin-right:5px;
    			 border:0;}	
    			 
    #nav ul     {list-style-type:none;} 
    
    #nav li     {display:inline;}    
    
    #nav a      {text-decoration:none;
    			 padding-bottom:15px;}
    			 
    #nav a:link    {color:#996633;}
    #nav a:visited {color:#ccaa66;}
    #nav a:hover   {color:#330000;}
    
    #content	{background-color:#f2eab7;
    			 text:#000000;
    			 margin-left:150px;
    			 margin-top:0px;
    			 margin-bottom:0px;
    			 padding-right:20px;
    			 padding-left:20px;
    			 padding-bottom:30px;
    			 padding-top:10px;}
    			 
    label 		{float:left;
    			 display:block;
    			 text-align:right;
    			 width:120px;
    			 padding:1;}
    			 
    input 		{display:block;
    			 margin-bottom:1px;}
    			 
    textarea	{display:block;
    			 margin-bottom:1px;}	
    			 
    table		 {width:85%;
    			  margin:auto;}
    			  
    td, th 		 {padding: 10px;}
    			  
    thead {background-color:#ccaa66;}
    
    tfoot {background-color:#ccaa66;}
    			 
    .floatright		{float: right;
    			 padding-left:20px;}
    			 
    .floatleft  {float:left;
    			 padding-right:20px;
    			 padding-bottom:20px;
    			 padding-left:20px;
    			 padding-top:2px;}	
    			 
    .clearleft  {clear:left;} 
    
    .details	{padding-left:20%;
    			 padding-right:20%;
    			 border:none}				
    
    h2			{text-transform:uppercase;
    			 background-color:#ffffcc;
    			 color:#663300;
    			 font-size:1.2em;
    			 border-bottom:1px solid #000000;
    			 padding-left:5px 0 0 5px;
    			 margin-right:20px;
    			 clear:left;}
    			 
    #mobile      {display:none;}
    
    #desktop	 {display:inline;}				
    			
    #footer 	{background-color:#ccaa66;
    			color:#330000;
    			font-size:11px;
    			font-style:italic;
    			text-align:center;
    			padding:20px;
    			clear:both;}
    			
    #footer a   {text-decoration:none;}
    			 
    #footer a:link    {color:#ffffcc;}
    #footer a:visited {color:#f2eab7;}
    #footer a:hover   {color:#330000;}
    HERE IS MY CSS MOBILE CODE:

    Code:
    @charset "utf-8";
    
    body 		{background-image:none;
    			 background-color:#ffffcc;
    			color:#000000;
    			font:Verdana, Geneva, sans-serif;
    			padding:0;
    			margin:0;}	
    
    #wrapper    {width:100%;
    			 min-width:0;
    			 margin-left:0;
    			 margin-right:0;
    			 background-color:#ffffcc;
    			 -webkit-box-shadow: 5px 5px 5px #828282;
    			 -moz--box-shadow: 5px 5px 5px #828282;
    			 -box-shadow: 5px 5px 5px #828282;}
    			 
    #header		{background-image:url(javalogomobile.gif);
    			 background-position:center;
    			 background-repeat:no-repeat;
    			 
    			 height:80px;
    			 text:#oooooo;
    			 text-align:left;
    			 margin:0;}
    			 
    #header h1  {text-indent:-99999;
    			 margin: 0;}
    			 
    #nav		{float:none;
    			 background-color:#ffffcc;
    			 text-align:center;
    			 width:100%;
    			 padding-top:0;
    			 margin-top:0;
    			 border:0;}	
    			 
    #nav ul     {list-style-type:none;
    			 padding:0;
    			 margin:0;} 
    
    #nav li     {display:inline;}    
    
    #nav a      {text-decoration:none;
    			 display:block;
    			 padding:0.2em;
    			 font-size:1.3em;
    			 font-weight:bold;
    			 border-bottom:1px;
    			 border-color:#330000;}
    			 
    #nav a:link    {color:#996633;}
    #nav a:visited {color:#ccaa66;}
    #nav a:hover   {color:#330000;}
    
    #content	{background-color:#f2eab7;
    			 text:#000000;
    			 margin:0;
    			 padding:0.2em;}
    			 
    table		 {width:85%;
    			  margin:auto;}
    			  
    td, th 		 {padding: 10px;}
    			  
    thead {background-color:#ccaa66;}
    
    tfoot {background-color:#ccaa66;}	
    			 
    .floatright	 {display:none;
    			 float: right;
    			 padding-left:20px;}
    			 
    .floatleft  {float:left;
    			 padding-right:0.5em;
    			 padding-bottom:20px;
    			 padding-left:0.5em;
    			 padding-top:2px;}	
    			 
    .clearleft  {clear:left;} 
    
    .details	{padding-left:0;
    			 padding-right:0;
    			 border:none}				
    
    h2			{text-transform:uppercase;
    			 background-color:#ffffcc;
    			 color:#663300;
    			 font-size:1.2em;
    			 border-bottom:1px solid #000000;
    			 padding-left:0.5em 0 0 0.5em;
    			 margin-right:20px;
    			 clear:left;}
    			 
    #mobile      {display:inline;}
    
    #desktop	 {display:none;}	
    			
    #footer 	{background-color:#ccaa66;
    			color:#330000;
    			font-size:11px;
    			font-style:italic;
    			text-align:center;
    			padding-top:0
    			padding-bottom:0.5em;
    			clear:both;}
    			
    #footer a   {text-decoration:none;}
    			 
    #footer a:link    {color:#ffffcc;}
    #footer a:visited {color:#f2eab7;}
    #footer a:hover   {color:#330000;}
    Please help. Maybe it as something to do with the <h1 id="header">JavaJam Coffee House</h1> in the source code. Idk.

  • #2
    Regular Coder
    Join Date
    Dec 2010
    Posts
    139
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Have you got a live version ?

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello Boston617,
    Your .swf has pushed your h1 down to the next line so it is breaking out of 117px high #header. The h1 inherits #headers #ccaa66 and shows it over your #nav.

    Look at it this way once, just to show you what's happening -
    Code:
    			 
    #header		{
    			 background-position:center;
    			 background-repeat:no-repeat;
    			 /*height:117px;*/
    			 background-color:#ccaa66;
    			 text:#oooooo;
    			 text-align:left;
    			 margin:0;}
    To fix it, this might work for you -
    Code:
    #header h1 {
    /*text-indent:-99999px;*/
    display: none;
    			margin: 0;
    }
    OR

    Code:
    #header h1 {
    text-indent:-99999px;
    background: none;
    			margin: 0;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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