aligning images with layers

This is a discussion on "aligning images with layers" within the Web Page Design section. This forum, and the thread "aligning images with layers are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 22nd, 2007, 14:39
Junior Member
Join Date: Jun 2007
Location: uk
Age: 23
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
aligning images with layers

hey

I have a rounded box, which has been sliced into 3 separate images (top, middle, bottom). ive managed to code the box fine.

But im trying to place my header image at the top of this box using layers, but its not working, the image creates a gap inbetween the box. please see this link: http://www.kumar.adsl24.co.uk/mk.html
the z-index does not appear to be working. appreciate any help at alll

here is my css code:

Code: Select all
/* CSS Document */

body { 

  /*this centers everything, use text-align as a ressurance */
  text-align: center; 
  color: white; /* font color */
  /* if we dont set the background to blue if the window is resized the viewer
  will see white space, we dont want this. so set background to light blue and for the
  top apply background image */
  background: #aed0e4 url(images2/background.gif) repeat-x fixed top left;
  
  
}   

#container
{

  position: relative;
  width: 744px;
  margin: 0 auto;
  text-align: left;
  padding: 50px 50px;

}

#header
{
z-index: 1;
background: url(images2/tophalf.gif) no-repeat;
height: 50px;
}

#middle{
z-index: 2;
background: url(images2/middle.gif) repeat-y;
height: 600px;


}

#bottom {
z-index:3;
background: url(images2/bottomhalf.gif) no-repeat;
height: 60px;

}

#logo{
z-index: 4;
background: url(images2/header.gif) no-repeat;
height: 85px;
}
html code:

Code: Select all
<!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" xml:lang="en">
  <head>
  
  <title>Portfolio v1</title>
  <link href="layout.css" rel="stylesheet" type="text/css"/>
  </head>
 
  <body>
  
    <div id="container">
  <div id="header">
  </div>
  <div id="logo"></div>
  <div id="middle"></div>
  
  <div id="bottom"></div>
  
  
  
 </div>
  </body>
</html>
Reply With Quote

  #2 (permalink)  
Old Jun 22nd, 2007, 14:43
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: aligning images with layers

I don't see a rounded box in FF or IE6
Reply With Quote
  #3 (permalink)  
Old Jun 22nd, 2007, 14:48
Junior Member
Join Date: Jun 2007
Location: uk
Age: 23
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Re: aligning images with layers

woops i forgot to upload the changed pics. should be okay now
Reply With Quote
  #4 (permalink)  
Old Jun 22nd, 2007, 14:57
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: aligning images with layers

What's with all the z-index?! You don't need any of that.

change #logo to add what's I put in red.

Code: Select all
#logo{
z-index: 4;
background: #252525 url(images2/header.gif) no-repeat;
height: 85px;
}
Reply With Quote
  #5 (permalink)  
Old Jun 22nd, 2007, 15:08
Junior Member
Join Date: Jun 2007
Location: uk
Age: 23
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Re: aligning images with layers

well that does the trick lol.

the code you gave works fine, but i wish to position the logo image abit higher and abit to the right. i thought this could only be achieved with z-index?
Reply With Quote
  #6 (permalink)  
Old Jun 22nd, 2007, 17:23
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: aligning images with layers

No not z-index. Z moves it below or infront. If you have layers of clothes on, t-shirt, over shirt jackets and wanted the jacket underneath you'd use z-index.

You want to use positioning to set it where you want it.
Reply With Quote
Reply

Tags
layers

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aligning box to right fr33sty13 Web Page Design 8 Jun 6th, 2008 03:49
CSS Aligning Wesley Web Page Design 15 Jan 20th, 2008 19:49
[SOLVED] Aligning to the very top thewebkid Web Page Design 4 Dec 23rd, 2007 08:48
GD Aligning? PicoDeath PHP Forum 3 Aug 2nd, 2007 16:14
Table Images not Aligning Syody Web Page Design 1 Jul 27th, 2006 07:36


All times are GMT. The time now is 02:34.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43