Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Centered in IE is not centered in Firefox
Old 10-15-2005, 06:53 PM Centered in IE is not centered in Firefox
eJM
eJM's Avatar
Skilled Talker

Posts: 72
Name: Jim McClain
Location: teh Ether
Trades: 0
I have a header I designed in Macromedia Fireworks and is just a part of a template I am trying to put together for my business website. I have managed to center the header, but only when viewing it in IE. Using Firefox or other browsers (I also looked in Opera and Netscape), the header seems to be aligned left.

Can you look at the page, the source and the css and see if I have done something wrong or can suggest what I can do to correct the situation?

Here's the test document (the index that is also up has even bigger problems in Firefox, etc.) --> http://www.jmfloorcovering.com/test_...rs_header.html

Any advice would be appreciated.

Grump
eJM is offline
Reply With Quote
View Public Profile Visit eJM's homepage!
 
 
Register now for full access!
Old 10-15-2005, 11:40 PM
Novice Talker

Posts: 12
Trades: 0
I've look your site code. Maybe this can help you.

I think it's because of <center> tag. Firefox doesn't recognized this tag because it's not a w3c standard.

Change <center> tag into <div align='center'> (line 45) and </center> tag into </div>.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
laurente is offline
Reply With Quote
View Public Profile
 
Old 10-16-2005, 02:14 AM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
The centre tag has been depreciated. To get your content to center with <div> tags use CSS. For example:

body {
background-color: #464858;
margin: auto;
padding: 0px;
}

#header {
background-color: #EFEFEF;
margin: auto;
margin-top: 0px;
padding: 0px;
}
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.

Last edited by Mooofasa; 10-16-2005 at 02:16 AM..
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 10-16-2005, 02:14 AM
eJM
eJM's Avatar
Skilled Talker

Posts: 72
Name: Jim McClain
Location: teh Ether
Trades: 0
I had forgotten I tried a last ditch effort with the <center> tag. I replaced it with the divs, but that had no effect at all.

Grump
eJM is offline
Reply With Quote
View Public Profile Visit eJM's homepage!
 
Old 10-16-2005, 02:22 AM
eJM
eJM's Avatar
Skilled Talker

Posts: 72
Name: Jim McClain
Location: teh Ether
Trades: 0
Quote:
Put margin: auto into your bodt tag and into your #id
I think I understand the css margin element -- body {margin: auto;}. Right?

This is my current css body code:
Code:
body 
{
	background-color: #fff;
	background-image: url(images/nav/banner4.gif); 
      	background-repeat: repeat-x;
	text-align: center;
	color: #000099;
	font: 10pt tahoma, verdana, arial, helvetica, sans-serif;
	margin-bottom: 0;
	margin-left: 0;
	margin-right: 0;
	margin-top: 0;
}
Will changing that effect the centering of my header? It already has the centering element in it.

What is the #id thing. Please give an example for us n00bs.

Thanks,

Grump
eJM is offline
Reply With Quote
View Public Profile Visit eJM's homepage!
 
Old 10-16-2005, 02:29 AM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
Firstly, get rid of the margin-top, margin-bottom, and so on. You can roll them all into one by putting margin: (it covers the four sides in alphabetical order if you are using more than one value). By having margin: auto; you get the browser to equally space the left and right spaces from the margins. Giving you a centered div. #id is used with your div tags. <div id="#header"></dv>, this tells the div to get all of its formatting from your CSS.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 10-16-2005, 05:47 AM
eJM
eJM's Avatar
Skilled Talker

Posts: 72
Name: Jim McClain
Location: teh Ether
Trades: 0
Thank you, that helped a lot. Looks great now.

Grump
eJM is offline
Reply With Quote
View Public Profile Visit eJM's homepage!
 
Old 08-08-2008, 05:53 PM Re: Centered in IE is not centered in Firefox
Junior Talker

Posts: 1
Trades: 0
Thanks a million Laurente! I could kiss you! Was several weeks I was looking for that simple answer (found many complicated thingy!!)!!
You rule!
biquet1 is offline
Reply With Quote
View Public Profile
 
Old 08-09-2008, 05:10 AM Re: Centered in IE is not centered in Firefox
chrishirst's Avatar
Defies a Status

Posts: 43,971
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Actually you should use -> http://www.webmaster-talk.com/css-fo...r-website.html

because the align attribute is also deprecated.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Centered in IE is not centered in Firefox
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.63680 seconds with 11 queries