views:

1063

answers:

4

I've run into a weird quirk. The website I'm building for Escondido Arts Gallery has all of it's text in each element left-aligned in firefox and IE, but for some reason everything is center aligned in Safari. Is there one simple css or html fix I can do to fix this, or am I going to have to 'text-align: left' every element?

+1  A: 
* { text-align: left; }

If things are cascading properly this should conceptually be enough:

html, body { text-align: left; }
greyfade
Greyfade, thank you so much. Muhammad got it spot on (I had the body tag centered) but this fix was very helpful!
Brian
+1  A: 

Depends on why it is left-aligned. If it's simply the browsers applying different defaults, you can do as greyfade says to make all tags default to left-align in all browsers.

If the problem is bugs in the browsers CSS implementations, then you may have to trace down why the browsers disagree, and find some workaround to that.

Specifying a strict rather than transitional doctype may also help in getting more uniform behavior from the browsers (and let's be honest here, can we really claim to still be "transitioning" to HTML4.01 or XHTML1.0? Both standards have been out for close to a decade.)

jalf
+1  A: 

There is something wrong with the CSS (or there's an unclosed html tag). The center align property must be cascading from some other element because it's not only safari/chrome (which also uses webkit) but also opera that shows the things center aligned, and both safari/chrome and opera are more standards compliant than ie and even firefox.

Mussnoon
yes, it´s coming from the <body>...
jeroen
+2  A: 

No surprise there:

    <body tracingsrc="../../non assets/web2.jpg" tracingopacity="30" align="center">

Just get rid of the proprietary attributes (align="center" especially), and your problem is solved.

jeroen