Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Special Interests > Web Design and Development
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread  
Old Aug 12, 2008, 02:35 AM   #1
Fromethius
macrumors member
 
Join Date: Jun 2008
Location: Pennsylvania
Send a message via AIM to Fromethius Send a message via MSN to Fromethius
Table aligns fine in Internet Explorer and Safari but not in FireFox

I'm currently developing a new site for Day Tool, and I have the current build hosted under http://daytool.com/new2/

However, I have noticed that in FireFox the table that displays all of the content is off center (measured).

The site displays perfectly in Safari and Internet Explorer.

Why? Thanks.

Side-note: Also, in FireFox the image on the front page has a messed up border. This is another issue with FireFox. Why is this?
Fromethius is offline   Reply With Quote
Old Aug 12, 2008, 03:01 AM   #2
ProwlingTiger
macrumors 6502a
 
ProwlingTiger's Avatar
 
Join Date: Jan 2008
As for the border, use
Code:
border-right: 1px;
border-left: 1px;

...same for top and bottom.
I'm still looking at the centering. IE and FF always give me trouble on that too, at least when I handcoded. Dreamweaver makes it a bit easier now.
__________________
Remember the Alamo
Macbook 2.4ghz | Canon 40D for sale! | 16GB iPhone 3G S⃣
photography/design enthusiast
DVS Photo
ProwlingTiger is offline   Reply With Quote
Old Aug 12, 2008, 07:43 AM   #3
angelwatt
macrumors 601
 
Join Date: Aug 2005
Location: Dayton, OH
Don't use tables for layout, that's your problem. There's also a number of empty tags in your code. Also avoid align="center" attributes. Move all styling to your CSS.
angelwatt is offline   Reply With Quote
Old Aug 12, 2008, 12:09 PM   #4
ProwlingTiger
macrumors 6502a
 
ProwlingTiger's Avatar
 
Join Date: Jan 2008
Yeah, use

Code:
<div id="name"> in your html. put content within div tags.
#name {
attributes } for you CSS
__________________
Remember the Alamo
Macbook 2.4ghz | Canon 40D for sale! | 16GB iPhone 3G S⃣
photography/design enthusiast
DVS Photo
ProwlingTiger is offline   Reply With Quote
Old Aug 12, 2008, 02:04 PM   #5
Fromethius
Thread Starter
macrumors member
 
Join Date: Jun 2008
Location: Pennsylvania
Send a message via AIM to Fromethius Send a message via MSN to Fromethius
I tried using css with using a class with text-align: center; but it did not center the table.

Are there any other centering tags in css besides text-align?

And what do you mean by empty tags in my code?
Fromethius is offline   Reply With Quote
Old Aug 12, 2008, 04:06 PM   #6
InLikeALion
macrumors 6502a
 
Join Date: Jul 2007
Location: Oh... its no good.
"empty tags" are things like <p> or <span> or <div> with no semantic purpose. Using a <p> to give horizontal space, not to denote an actual paragraph, is a bad practice. Once you get more into this you'll understand why. Semantics means using html tags only for what they are intended, and not for presentation. This is one of the reasons why tables are not used for layout any more - when used for layout they are not holding tabular data, which is their purpose.

Generally to center a block-level element with css you will but the left and right margins to "auto".
__________________
I use: { Leopard; Adobe CS3: Ps, Ai, Id; Coda; (Espresso); Versions; MAMP; VirtualHostX; Drupal 6 ExpressionEngine; FF3 Safari 4; OnyX; Logic Ex 8 }
InLikeALion is offline   Reply With Quote
Old Aug 12, 2008, 05:50 PM   #7
angelwatt
macrumors 601
 
Join Date: Aug 2005
Location: Dayton, OH
Quote:
Originally Posted by InLikeALion View Post
"empty tags" are things like <p> or <span> or <div> with no semantic purpose.
Actually, by "empty tags" I meant code like below, taken from the site:
HTML Code:
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
There's no text inside those tags, and as such they are empty. From the CSS it looks like you are trying to use the above for some type of styling, which is also bad. The b tag is also deprecated so should not be used.
angelwatt is offline   Reply With Quote
Old Aug 13, 2008, 12:09 AM   #8
Fromethius
Thread Starter
macrumors member
 
Join Date: Jun 2008
Location: Pennsylvania
Send a message via AIM to Fromethius Send a message via MSN to Fromethius
Quote:
Originally Posted by angelwatt View Post
Actually, by "empty tags" I meant code like below, taken from the site:
HTML Code:
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
There's no text inside those tags, and as such they are empty. From the CSS it looks like you are trying to use the above for some type of styling, which is also bad. The b tag is also deprecated so should not be used.
Actually, I didn't write that bit. I found that from an html script online to make rounded rectangles.

Also, I have yet to find out how to center it properly in firefox
Fromethius is offline   Reply With Quote
Old Aug 13, 2008, 09:37 AM   #9
InLikeALion
macrumors 6502a
 
Join Date: Jul 2007
Location: Oh... its no good.
Quote:
Originally Posted by Fromethius View Post
Also, I have yet to find out how to center it properly in firefox
Did you follow my suggestion of margin: 0 Auto; ?
__________________
I use: { Leopard; Adobe CS3: Ps, Ai, Id; Coda; (Espresso); Versions; MAMP; VirtualHostX; Drupal 6 ExpressionEngine; FF3 Safari 4; OnyX; Logic Ex 8 }
InLikeALion is offline   Reply With Quote
Old Aug 13, 2008, 02:59 PM   #10
Fromethius
Thread Starter
macrumors member
 
Join Date: Jun 2008
Location: Pennsylvania
Send a message via AIM to Fromethius Send a message via MSN to Fromethius
Thanks, must have missed that.

Works now.
Fromethius is offline   Reply With Quote

Reply

Mac Forums > Special Interests > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump


All times are GMT -5. The time now is 12:06 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC