473,387 Members | 1,516 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,387 software developers and data experts.

Make Firefox Center Content in a div Or td Tag By Using CSS?

Make Firefox Center Content in a div Or td Tag By Using CSS?

Does anyone know how to do this. IE works great with text-align:center;
but Firefox just always left-aligns...

Aug 5 '05 #1
2 11395
Els
jo*********@topscene.com wrote:
Make Firefox Center Content in a div Or td Tag By Using CSS?

Does anyone know how to do this. IE works great with text-align:center;
but Firefox just always left-aligns...


If you'd use a valid doctype, IE6 wouldn't do it either.
text-align:center only works on inline content.

To center block-level elements, you need to set the left and right
margin to identical values.

For instance:
<div class="outer">
<div class="inner">
some content
</div>
</div>

To center div.inner inside div.outer, you can use:
div.inner{width:[some value];margin:auto;}
or
div.inner{width:auto;margin:[some value];}

(Note: width:auto; is superfluous on a div, unless you've set a width
on divs earlier in the stylesheet, which you need to 'undo' by setting
it to the default 'auto'.)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: D.A.D. - Bad Craziness
Aug 5 '05 #2
jo*********@topscene.com wrote:
Make Firefox Center Content in a div Or td Tag By Using CSS?
http://dorward.me.uk/www/centre/
Does anyone know how to do this. IE works great with text-align:center;


Since the spec says that it shouldn't act in that way, its hardly "great".

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Aug 5 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Joey | last post by:
Does anyone know how to center this sample webpage in Firefox? If so, will you provide the example as it applies to this sample webpage? I have read numerous posts and articles on how to center...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
9
by: Dave | last post by:
Hi, I've been trawling the web for answer to my problem with no luck although I'm hardly alone it seems! Below is the generated source for an ASP page that posts a value called 'album' to...
3
by: autospanker | last post by:
Ladies and Gentleman, I have been having this problem that has been driving me insane. I have a website that when viewed in Firefox first, the content in the body area is pushed down. Then when...
4
by: kumuda v | last post by:
Hi, I am new to web development. I have designed a main page using html and css, I am working in linux OS so I am using firefox. But the problem is with IE, where the entire contents and...
2
by: crumsoft | last post by:
hello every one i have face some problem related to css. my css file work good in firefox but not looking so good and work properly in internet explorer 6.0 plz help me and solve this problem....
1
by: Jahamos | last post by:
Background: I have copy and pasted an Excel flowchart into a Dreamweaver html page. I created a frame on the top of the page as a viewer. I created hotspot links over the flowchart items. Each...
3
by: Steve | last post by:
Hi All I have an asp.net 2.0 website with the following css file It uses Master pages and in Firefox 3.04 for windows only, 3 of the web pages don't display the Master page properly The...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.