|
|
| Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate. |
|
|||||||
| TouchArcade.com - iPhone Game Reviews and News |
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
macrumors member
|
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 |
| View Public Profile |
| Find More Posts by Fromethius |
|
|
#2 |
|
macrumors 6502a
Join Date: Jan 2008
|
As for the border, use
Code:
border-right: 1px; border-left: 1px; ...same for top and bottom.
__________________
Remember the Alamo Macbook 2.4ghz | Canon 40D for sale! | 16GB iPhone 3G S⃣ photography/design enthusiast DVS Photo |
|
|
|
| ProwlingTiger |
| View Public Profile |
| Find More Posts by ProwlingTiger |
|
|
#3 |
|
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.
|
|
|
|
|
|
#4 |
|
macrumors 6502a
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 |
| View Public Profile |
| Find More Posts by ProwlingTiger |
|
|
#5 |
|
Thread Starter
macrumors member
|
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 |
| View Public Profile |
| Find More Posts by Fromethius |
|
|
#6 |
|
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 |
| View Public Profile |
| Find More Posts by InLikeALion |
|
|
#7 | |
|
macrumors 601
Join Date: Aug 2005
Location: Dayton, OH
|
Quote:
HTML Code:
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> |
|
|
|
|
|
|
#8 | |
|
Thread Starter
macrumors member
|
Quote:
Also, I have yet to find out how to center it properly in firefox
|
|
|
|
|
| Fromethius |
| View Public Profile |
| Find More Posts by Fromethius |
|
|
#9 |
|
macrumors 6502a
Join Date: Jul 2007
Location: Oh... its no good.
|
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 |
| View Public Profile |
| Find More Posts by InLikeALion |
|
|
#10 |
|
Thread Starter
macrumors member
|
Thanks, must have missed that.
Works now. |
|
|
|
| Fromethius |
| View Public Profile |
| Find More Posts by Fromethius |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|