Web Analytics Made Easy -
StatCounter Changing the size of the browser alters my website - CodingForum

Announcement

Collapse
No announcement yet.

Changing the size of the browser alters my website

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing the size of the browser alters my website

    I am fairly new to this, I have a good grasp on HTML and CSS coding however I am making my first real website(by real I mean for a big company, I've made a few for classes and myself, etc.). I am using style sheets for my webpage, I set up a header, top nav, three columns and a footer. I have an image slider on my homepage in the center column, however whenever I shrink the browsers width below a certain point, the image slider seems to get pushed out of the center column and messes up the layout of the entire site. Unfortunately I cannot put too much code up here b/c I am under an NDA, I will look through some of my code to see if I can throw anything up here to help you out(I know seeing the code and a live website helps a lot more). If anyone has any suggestions to help me out that would be great. Also I know the browser can affect it, I am using Safari and I am currently installing some other browsers to see if I get the same problem.

    Here is the code for my CSS

    Code:
    @charset "UTF-8";
    
    
    *{
    	margin:0px auto;
    	padding:0px auto;
    	
    
    }
    
    #wrapper{
    	
    	
    }
    
    #header{
    	background-image:url(waterdrops.jpg);
    	height:80px;
    	color:#FFF;
    	font-family:Verdana, Geneva, sans-serif;
    	text-align:center;
    	
    }
    
    
    #topnav{
    	height:40px;
    	background-color:#FFF;
    	text-align:center;
    	
    	margin:auto;
    	
    }
    
    #topnav ul{
    	list-style-type:none;
    	text-align:center;
    	color:#FFF;	
    }
    
    #topnav ul li{
    	width:80px;
    	float:left;
    	text-decoration: none;
    	
    	
    	
    }
    
    #typenav ul li a{
    	font-family:verdana, arial;
    	text-decoration:none;
    	display:block;
    	background-color:#F03;
    	text-align:center;
    	
    }
    
    #content-wrapper{
    	
    }
    
    #leftnav{
    	float:left;
    	width:100px;
    	height:700px;
    	text-align:center;
    	color:#FFF;
    	background-image:url(waterdrops.jpg);
    }
    
    
    
    #right{
    	float:right;
    	background-image:url(waterdrops.jpg);
    	width:100px;
    	height:700px;
    	text-align:center;
    	color:#FFF;
    	
    }
    
    #content{
    	text-align:center;
    	background-color:#B0B0B0;
    	height:700px;
    	margin-left:100px;
    	margin-right:100px;
    	color:#FFF;
    }
    
    
    
    
    #footer{
    clear:both;
    background-color:#FFF;
    	height:20px;
    	text-align:center;
    }

    Happy Coding,
    Pete

  • #2
    We need at least a stripped down version of the HTML, too, because CSS alone isn’t doing and telling us anything.
    Stop solving problems you don’t yet have!

    Comment


    • #3
      [CODE]
      <!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">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title></title>
      <link href="style.css" rel="stylesheet" type="text/css" />
      <script type="text/javascript">
      <!--
      var image1=new Image()
      image1.src="img.jpg"
      var image2=new Image()
      image2.src="img2.jpg"
      var image3=new Image()
      image3.src="img3.jpg"
      //-->
      </script>

      </head>

      <body>
      <div id="wrapper">

      <div id="header">
      <br />
      <h1>W</h1>
      </div>

      <div id="topnav">
      <ul>
      <li><a href="Home.html">Home</a></li>
      <li><a href="About.html">About</a></li>
      <li><a href="Press.html">Press</a></li>
      <li><a href="#">Policies</a></li>
      <li><a href="#">Cart Login</a></li>
      <li><a href="#">Track Your Order</a></li>
      <li><a href="ContactUs.html">Contact Us</a></li>
      </ul>

      </div>

      <div id="content-wrapper">


      <div id="leftnav">
      </div>

      <div id="right">

      </div>


      <div id="content"><img src="img.jpg" name="slide" width="401" height="374" />
      <script>
      <!--
      //variable that will increment through the images
      var step=1
      function slideit(){
      //if browser does not support the image object, exit.
      if (!document.images)
      return
      document.images.slide.src=eval("image"+step+".src")
      if (step<3)
      step++
      else
      step=1
      //call function "slideit()" every 2.5 seconds
      setTimeout("slideit()",4000)

      }
      slideit()
      //-->
      </script>

      <br />
      <br />
      <h4>Blah Blah Blah Blah</h4>
      <br />
      <h4>More Blah Blah Blah</h4>
      <br />
      <h4>And even more Blah Blah</h4>



      <br />
      <h4>Blaaaaaaaaaaaaaaaaah</h4>





      </div>

      <div id="footer">
      <p></p>
      </div>

      </div>

      </body>
      </html>

      Comment

      Working...
      X