[SOLVED] Basic Positioning Issue

This is a discussion on "[SOLVED] Basic Positioning Issue" within the Web Page Design section. This forum, and the thread "[SOLVED] Basic Positioning Issue 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 Apr 15th, 2008, 11:56
New Member
Join Date: Apr 2008
Location: Midlands, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Basic Positioning Issue

Hi Guys,
Can anyone help me with a basic positioning issue!

HTML:
Code: Select all
<body>
<div class='whitebox'>
<p>Ipsum, eu adipiscing, praesent ad, lobortis quis. Vulputate laoreet qui, quis sit. In minim hendrerit odio ex ea diam duis. Wisi augue, tation facilisis eu tation. Molestie adipiscing in et velit praesent. In autem velit, dolore, dignissim te praesent eros. Wisi lobortis nisl hendrerit exerci qui vel duis facilisi dolor. Duis facilisis luptatum, lorem augue iriure autem ex augue. Vulputate lobortis velit ut aliquip ad consectetuer ut eros.p>
 
<div align='center'><img src='Images/MotherShip_in_Orbit.jpg'></div>
<br>

</div>
</body>
CSS:
Code: Select all
body { 
 background-color: #000000;
 }
.whitebox { 
 background-color: #FFFFFF; 
 width: 1000px; 
 align: center;
 }
p {
 font-family: Verdana, Arial, Helvetica, sans-serif; 
 font-size: 0.9em; 
 color: black; 
 line-height: 1.5em;
 margin-left: 20px;
 margin-right: 20px;
 text-align: justify;
 }
What I would expect to see would be a black page with a white box aligned in the middle. The white box would then have justified text and a centered image below it.

What I get in IE7 is all of the above only the white box has not been aligned, it is still over on the left as default! Can anyone help me?

Thanks in advance.
Tom
Reply With Quote

  #2 (permalink)  
Old Apr 15th, 2008, 12:20
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 977
Blog Entries: 2
Thanks: 5
Thanked 19 Times in 17 Posts
Send a message via Skype™ to Aso
Re: Basic Positioning Issue

align is not a CSS property.

If you wish to center a block horizontally, with a known width, use;
Code: Select all
margin: 0 auto;
This sets the top and bottom margins to 0, and the left and right margins to auto.
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #3 (permalink)  
Old Apr 15th, 2008, 12:30
New Member
Join Date: Apr 2008
Location: Midlands, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Basic Positioning Issue

Thank you!
That was a quick fix, its been so long since I've done any CSS I was just staring at it!
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
[SOLVED] Basic database to call information hausjellp PHP Forum 30 May 1st, 2008 09:29
[SOLVED] Basic blog CMS that's easily integrated Aso PHP Forum 9 Dec 1st, 2007 11:21
[SOLVED] css positioning issue danny322 Web Page Design 4 Nov 23rd, 2007 13:32
[SOLVED] Visual Basic Help Please Jack Franklin Scripts and Online Services 2 Sep 16th, 2007 17:12
menu / layout positioning issue in IE Pixelate Web Page Design 2 May 9th, 2006 13:15


All times are GMT. The time now is 03:51.


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