I have a smoothgallery within a content div that has the style rule "text-align: center;". All the content in this div centers correctly in IE7 but not in FF2 where the smoothgallery box is left-aligned. I tried setting "text-align: center;" for the relevant elements in default.css with no luck. Can anyone shed some light on this?
Thanks,
Anton
-
MODX Staff
- 2,502 Posts
Using "text-align: center;" to center divs is not the best way to position them. The best way to center a div is to position it using the following:
This works in all major browsers including IE7 and IE6. Make sure that you assign a width and remove the "text-align:center;" attribute/value.
An URL would be helpful to be sure.
Hope this helps.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 2,502 Posts
We all need a reminder of stuff like this once and a while. Glad it helped.
BTW you can actually drop the px in the code to read:
It is less characters if you are into the lighter code thing.
Cheers,
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub