View Full Version : Help with DIV and CSS layout (pics included)

11-11-2010, 11:37 PM
Hi there! I'm currently coding a layout I designed, however I've encountered a problem. Here's a picture of how I want the layout to look:


Now obviously this will be thriving with text and images when finished, me and my friend are coding it together. We've gotten everything perfect so far apart from the bit just above the white content area, the part where it gives a 3D effect below the header. The image is not a screenshot but the actual layout created in Photoshop

Up until this point has been coded using CSS and DIV layering, the plan is eventually to include PHP for the content etc. The corners of this one row will not go into place though, and when they do, they always mess up when the page becomes smaller (because at the minute the layout is using a width of 100%) This is how it's appearing in my browser:


I've tried Firefox, Chrome and Safari, all bringing up the same results.

I'm quite new to coding so any suggestions would be helpful, thank you :)


11-12-2010, 01:56 AM
Hello DannyCare,
It's impossible to guess how you're putting this site together without seeing your code. Since it's an issue with images, a link to the test site would be best so we can see them.

11-12-2010, 03:06 PM
I'm sorry, how silly of me haha. Right the coding is here:


That's the source, then the CSS file is:


The test site is here:

Sorry for my stupidity haha!

11-12-2010, 03:48 PM
Here's couple different examples that may help you...Just copy/paste this code into a new .html file and open with your browser to view -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
margin: 0;
background: #FC6;
#container {
width: 100%;
margin: 30px auto;
padding: 25px 0; /*just some separation for demonstration only*/
background: #999;
overflow: auto;
font-size: 0.8em;
.nav_bg {
height: 32px;
background: url(;
.float_L {float: left;}
.float_R {float: right;}
.nav_bg2 {
margin: 100px 0 0; /*just some separation for demonstration only*/
height: 32px;
background: url(;
position: relative;
#leftImg {
height: 32px;
width: 32px;
position: absolute;
top: 0;
left: 0;
#rightImg {
height: 32px;
width: 32px;
position: absolute;
top: 0;
right: 0;
<div id="container">
<div class="nav_bg">
<img src="" width="32" height="32" class="float_L" />
<img src="" width="32" height="32" class="float_R" />
<!--end nav_bg--></div>
<div class="nav_bg2">
<img src="" id="leftImg" />
<img src="" id="rightImg" />
<!--end nav_bg--></div>
<!--end container--></div>