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

centering a div inside of a div in FireFox

I'm struggling to redesign this site so that it is "stretchy".
Previously everything was fixed-width and absolutely positioned. I was
hoping to get the text at top to center inside the top banner. This
works in IE on a PC, but not in FireFox. Any tips?

http://www.publicdomainsoftware.org/index.php?pageId=29

Jul 24 '05 #1
2 19892
Once upon a time *l*******@geocities.com* wrote:
I'm struggling to redesign this site so that it is "stretchy".
Previously everything was fixed-width and absolutely positioned. I was
hoping to get the text at top to center inside the top banner. This
works in IE on a PC, but not in FireFox. Any tips?

http://www.publicdomainsoftware.org/index.php?pageId=29


<div> is block level element, text is inline content. Add
"margin-left:auto;" and "margin-right:auto;" to the block level
element and it will center the <div>.

"text-align:center;" centers only the inline content (sutch as text).
IE has bugs that often treats block level as inline for centring.

--
/Arne

Top posters will be ignored. Quote the part you
are replying to, no more and no less! And don't
quote signatures, thank you.
Jul 24 '05 #2
lk******@geocities.com wrote:
I'm struggling to redesign this site so that it is "stretchy".
Previously everything was fixed-width and absolutely positioned. I was
hoping to get the text at top to center inside the top banner. This
works in IE on a PC, but not in FireFox.


http://dorward.me.uk/www/centre/

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

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

Similar topics

11
by: Jeff Thies | last post by:
I have a series of blocks that are float left that I need centered on the page. <div class="center" align="center"> <div style="width: 100 px;float: left">thumbnail 1</div> <div style="width:...
5
by: Duane Lambe | last post by:
Hi - just a quick question, I hope it's simple enough that a visual example isn't required. I have an internal site, everything's the way I want it, but there's an anomoly in both Opera and...
3
by: yawnmoth | last post by:
I'm trying to center list elements in a webpage I'm working on, and setting margin-left to auto for ol (or ul) seems to prevent the number (or bullet) from displaying in IE6 (strict mode) and...
5
by: Spondishy | last post by:
Hi, I am using the following in my stylesheet to center divs in firefox. html>body { font-size: 13px; } div.centerdiv {
5
by: rengaw03 | last post by:
How do I center a HTML login form horizontally on a page? I can't find anything useful on the web -- no shortage of sites offering to sell me three-column layouts with a flexible center column, or...
3
by: John Pote | last post by:
1. Horizontal centering a <divin browser window. The current trend seems to be to place page content in a fixed width area in the middle of the browser window. How is this achieved? If I use a...
5
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up...
3
by: BT | last post by:
I have taken over the support of an existing webpage and I need to revise the page so that it is centered (left and right) on the screen instead of aligned on the left. I can do this easily, but...
9
by: Neal | last post by:
http://www.brassattackofspringfield.com/gigs.html CSS at http://www.brassattackofspringfield.com/default.css Opera and IE render caption as desired. Firefox does not. Why? And is there a fix?
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
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
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.