Problem with moving

This is a discussion on "Problem with moving" within the Web Page Design section. This forum, and the thread "Problem with moving 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 Oct 10th, 2007, 11:04
New Member
Join Date: Oct 2007
Location: Holland
Age: 19
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Problem with moving

Hello everyone,

I'm working on my portfolio site and I've stumbled on a bit of a problem:

screenie2.jpg

I want the middle body ( the one with the bright colour to go in the center of the body that is behind it

HTML: Select all
HTML:
<!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><link rel="stylesheet" href="style.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Portfolio</title>
</head>

<body>
<div class="logo"><a href="#.html"><img src="Logo.jpg" border="0" /></a></div>
<div class="body"><div class="inner"></div>
</div>
</body>
</html>
CSS:
Code: Select all
@charset "utf-8";
/* CSS Document */

body  {
background-image:url(Background.jpg);
background-repeat:repeat-x; }

.logo {
width:244px;
height:49px;
padding-left:182px;
padding-top:20px; }

.body {
width:763px;
height:437px;
background-image:url(Body.jpg);
background-repeat:repeat-x;
margin-top:24px;
margin-left:160px; }


.inner {
height:398px;
width:721px;
background-image:url(inner.jpg);
background-repeat:repeat-x; }
Thanks in Advance.

Last edited by karinne; Oct 10th, 2007 at 13:15. Reason: Please attach big images!
Reply With Quote

  #2 (permalink)  
Old Oct 10th, 2007, 11:10
SuperMember

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

Add the part in red and it should center:
Code: Select all
.inner {
height:398px;
width:721px;
background-image:url(inner.jpg);
background-repeat:repeat-x;
margin: 0 auto;
 }
Reply With Quote
  #3 (permalink)  
Old Oct 10th, 2007, 11:14
New Member
Join Date: Oct 2007
Location: Holland
Age: 19
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problem with moving

It's centered now in the top, it needs to go down still, to be really centered :S
Reply With Quote
  #4 (permalink)  
Old Oct 11th, 2007, 08:45
New Member
Join Date: Oct 2007
Location: Holland
Age: 19
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problem with moving

Anyone?
Reply With Quote
  #5 (permalink)  
Old Oct 11th, 2007, 09:12
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Problem with moving

Try this:
Code: Select all
<style type="text/css">
body  {
background-image:url(Background.jpg);
background-repeat:repeat-x;
}

.logo {
width:244px;
height:49px;
padding-left:182px;
 padding-top:20px;
}

.body {
width:760px;
height:440px;
background: brown;
margin-top:24px;
margin-left:160px;
 padding: 20px;
}


.inner {
height: 440px;
width: auto;
background: yellow;
 margin: 0 auto;
}
 </style>
  1. Center the .inner horizontally using {margin 0 auto},
  2. Make the two div the same size (.body and .inner), and give the .body a padding of 20px.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

Last edited by Monie; Oct 11th, 2007 at 09:16.
Reply With Quote
Reply

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
Moving Nav bar acrikey Web Page Design 5 Sep 26th, 2007 13:37
slider moving problem arhun JavaScript Forum 1 Sep 14th, 2007 15:38
Moving Ryan Fait Webforumz Cafe 36 Jun 12th, 2007 22:55


All times are GMT. The time now is 20:57.


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