473,386 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Postion correct in IE not Firefox

My design is not centering in Firefox but it looks correct in IE, can anyone tell me that is wrong:

Here is the page: http://lukasdesigns.com/nolte/

Here is my CSS code:
/* CSS Document */

@charset "utf-8";
* {
margin: 0;
padding: 0;
border: 0;
}
h1 {
font-size:14px;
color: #FFFFFF;
}
h2 {
font-size: 16px;
color:#000000;
}

body {
margin: 0;
padding: 0;
text-align: center;
background-color: #CCCCCC;
font: small Arial, Helvetica, sans-serif;
font-size:14px;
}

#wrapper {
position: relative;
text-align: left;
width: 700px;
margin-right: auto;
margin-left: auto;
background color: #FFFFFF;
background: url(homepage.jpg) no-repeat;
background-position: left top;
margin: 0px;
}

#address {
width: 60%;
margin-top: 89px;
margin-left: 275px;
padding: 15px;
text-align:center;

}

#content {
width: 420px;
padding: 20px;
margin-top: 100px;
margin-left: 210px;
text-align:justify;
}

#sitenote {
padding: 35px;
postion: bottom center;
margin-left: 210px;
}


Thank you
Jul 15 '07 #1
8 2317
drhowarddrfine
7,435 Expert 4TB
In your #content, you first set margins left and right to auto, and then say margin:0. Firefox correctly did what you said while IE ignored what you said. So FF was correct and IE, as usual, is wrong. Remove margin:0 from #content.
Jul 15 '07 #2
Thank you, that fixed the horizontal alignment. However, now it is also centering the vertical alignment. I am not sure why because I have:

background position: left top;

Do I have another statement that is overruling that one?

Thank you,
Jul 16 '07 #3
drhowarddrfine
7,435 Expert 4TB
Validate your html and css for that list of errors to fix.
Jul 16 '07 #4
I have validated my CSS and HTML and fixed what I needed and this did not change the fact that it is centering vertically and cutting of the end of the background image at the bottom of the page.

Any suggestions?

Thank you,
Jul 16 '07 #5
drhowarddrfine
7,435 Expert 4TB
Your html is still incorrect. The <style></style> needs to be in the <head> and you have two </head> tags.
Jul 16 '07 #6
Thank you again but I still have the same problem with the vertical centering and chopping off the bottom part of the background

Why?
Jul 16 '07 #7
drhowarddrfine
7,435 Expert 4TB
The background-position references the element it is in, but you have #address set 89px from the top, which is whyit may look centered. Also, #content is what's controlling the centering of that text. You have this set 100px from the top. So the background-position has nothing to do with the problem.
Jul 16 '07 #8
Thank you for your help - I have what I needed fixed now!
Jul 17 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: wqhdebian | last post by:
I get a resutSet from one database as xml and want to insert these data to another database,and I want to form sql statement from the xml, and then using these sql statement to insert these data....
2
by: Sriram | last post by:
HI All, I have a problem in positioning a span within a div. In IE, the top and left attribute of inner object (span) is calculated from the container object, but in Firefox it is getting...
1
by: lg | last post by:
Is there a way to set/get vertical scroll postion without Javascript. At times I need to repaint the page but the page should scroll to certain postion depending on user input.
3
by: sungung | last post by:
Hi group, I want to back orginal scroll postion after reload page. Is it possible? My situation is call popup windows -enter data on popup -close popup -refresh parent page -reload data. As...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.