Jump to content

Recommended Posts

For some reason my Wrapper isnt holding my hold page, i must have forgot a closing div.

 

Can someone just look at the code and see what you think.

 

<!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" />

<link rel="stylesheet" type="text/css" href="../css/layout.css" /> 
<link rel="stylesheet" href="../css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="../js/prototype.js"></script>
<script type="text/javascript" src="../js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="../js/lightbox.js"></script>


<title>Nextdayfrags.co.uk</title>
</head>

<body>
<!--wrapper to hold site-->
    <div id="wrapper">
    	
        <!--Logo holder-->
      <div id="header">
      	
      </div>
        
        <div id="left">
        	<div class="nav">
        	<a href="#">View Cart</a>
        	<a href="#">Clear Cart</a>
        	
        	</div>
        </div>
        
        <div id="right">
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
            Why do we use it?</p>
  
                      
            <?php 
            require_once '../functions/functions.php';
            
            $output ='  <table class ="products">
            <tr>';
            
            
            foreach(get_xml_cataloge() as $product)
            {
            	$output .= '
            			<td>
            		<h2>'. $product->title .'</h2>
            		<div>
            			<a href="'. $product->img .'" rel="lightbox"><img src="'. $product->img .'" height="100" width="100"   /></a> 
            			
            				
            			
            		</div>
            		<div>'. $product->description .'</div>
            		<div class="price">
            		'. $product->price .'
            		</div>
            		<div class="addtocart">
            			<a href="#">add to Cart</a>
            		
            		</div>
            	</td>';
            	 
            }
            $output .='    </tr>
            </table>';
            echo $output;
            
            ?>
            
           
            
            
        </div>
        
      

    
    </div>
   

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/180893-can-anyone-find-a-problem/
Share on other sites

It's because wrappers don't automatically expand to contain floated elements. Add this to the wrapper to make it contain the elements:

 

overflow:auto;

 

One thing you should know though, your site looks garbage on a widescreen monitor. The background image only extends about 2/3 the way across the screen, and the right 1/3 is just white. But your contents inside the wrapper sit in the middle of the screen. It's all messed up.

Cheers for the advice.

how do they do it on these sites though they all have detailed images as backgrounds, im just trying to make my site aesthetically pleasing.

 

http://www.noupe.com/design/63-impressive-website-background-images-trends-resources-and-tutorials.html

If you look at the first site in that list;

 

1. the background only snaps the horizontal, the vertical is not important.

 

2. http://www.viget.com/images/extend/outer_wrapper_bg.jpg - that's the background image. It's just repeated on the x axis.

As I emntioned in my first reply you can repeat your image. But it isn't a 'repeatable image' as the link above is. You could look for some different images/banners to use in place of yours. Have it fade out to a solid colour that you can set your background to.

That would depend on your image. If the sides of the image fade to a solid colour you can set that colour as your background-color. If you get an image that will repeat nicely on the x-axis you can set background-repeat to repeat-x. Or the option I wouldn't go for, you can get a massive image (I really wouldn't do that).

Ok, i have done as advised hopefully i have got it right, if possible could you take a look.

http://www.deansaddigh.centelia.net/Php%20Shoping%20cart/html/

I basically did what you said made an image fade it to a solid colour and used a background colour that blends.

That's def better than it was!!

 

Try the following;

 

replace

 

background-image:url(../images/pagebg.jpg); background-attachment:fixed; background-repeat	:no-repeat;
background-color: #1372ce;

 

with

 

background-image: url(../images/pagebg.jpg) no-repeat fixed center top #1372ce

 

That's the shorthand for everything you've written. And I've positioned the image at the center top position!

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.