HighDots Forums  

need help center aligning in FF; works in IE

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss need help center aligning in FF; works in IE in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
dorayme
 
Posts: n/a

Default Re: need help center aligning in FF; works in IE - 06-16-2009 , 11:09 PM






In article <2t699k.jp4.19.1 (AT) news (DOT) alt.net>, Ed Mullen <ed (AT) edmullen (DOT) net>
wrote:

Quote:
There are purists amongst us.

Those who construct CSS and HTML letter by letter.
Me, I do it atom by atom. I have found that I can get away with slightly
less electrons than normal.

--
dorayme

Reply With Quote
  #12  
Old   
Jeff
 
Posts: n/a

Default Re: need help center aligning in FF; works in IE - 06-16-2009 , 11:25 PM






Ed Mullen wrote:
Quote:
Jeff wrote:
Ed Mullen wrote:
dorayme wrote:
In article <2t5do8.4ag.17.1 (AT) news (DOT) alt.net>, Ed Mullen
ed (AT) edmullen (DOT) net> wrote:

lawpoop wrote:
I have a layout that works in IE but not in Firefox. I want the table
that holds the form to be center aligned.

http://nerdcraft.net/test.html

What am I doing wrong here?
Add this to your table CSS:

margin-left: auto;
margin-right: auto;

Or margin: auto;
OP doesn't seem to need his style="padding-top: 300px; text-align:
center; margin-left: auto; margin-right: auto;" on his containing DIV


Right, but it's causing no harm, correct?

It looked to me that he kept adding stuff until it worked, or
didn't. Often those superfluous bits come back to bite you. It
certainly adds complexity if you want something else.

My own belief is not to add anything that you don't know what it
does. Of course, I've seen a lot of html where that wasn't true.

Jeff


There are purists amongst us.

Those who construct CSS and HTML letter by letter. God bless them. I
don't have the time nor the inclination. I freely "borrow" bits that
work for me. I then try to trim out what isn't relevant to my usage. Do
I get it all out? No. Are my efforts perfect? Hardly.
It's a lot simpler to design a web page than it used to be. It's a
lot simpler these days to use a bit of CSS than nested tables.

Now, lets look at the OPs example for a moment. He has an unnecessary
text align-center which he later over rides twice, once with a style and
the other with an attribute. That isn't simpler.

Lets look at centering once more. It used to be that you'd have to
use a few hacks, that text-align center (of a parent container) is one
of them, and then you'd have to text-align: left (the centered
container) to fix the centered alignment. Isn't a proper doctype and
margin: auto simpler? You can now do that because the browsers requiring
such hacks are dead.

I don't see relatively clean web design as being hard, I see it as
dead easy, once you pick up a few basics.

I use one template these days and I haven't run across anything that
requires more than a bit of adjustment. Having to write fresh html for
each new site, now that is hard. But since I know what is in my
template, and what it does, it's a simple matter to just adjust.

I'm no purist, I'm pragmatic. I'm also a programmer, so I find that
less code that is better organized is easier to maintain than more
disorganized code. Maintenance and reuseability is what it comes down to
for me. It's also a lot easier to predict what will happen cross
browser, or in not yet released (usually MS) browsers. YMMV.

Jeff
Quote:
But, when someone comments on it I try to
accept it and make it work, adjust as necessary, etc.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.