SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: centering javascript in firefox
-
Feb 21, 2005, 04:08 #1
- Join Date
- Nov 2003
- Location
- tazmania
- Posts
- 38
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
centering javascript in firefox
hey guys
normally for firefox centering html this would work but it doesn't seem to with the script?
<div style="text-align:center;">
<div style="margin:auto 0px;"><script src="script.js"></script></div>
</div>
is there any other trick? the javascript is just a simple fixed width (779px) image scroller, it centres in IE fine.
thanks.
-
Feb 21, 2005, 06:24 #2
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You've gotten the vertical and horizontal margins the wrong way round. Try
HTML Code:<div style="width:779px; margin:0 auto">...</div>
Birnam wood is come to Dunsinane
-
Feb 21, 2005, 06:28 #3
- Join Date
- Nov 2003
- Location
- tazmania
- Posts
- 38
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
arrgg, i did have them the right away around in my code just posted it wrong here, but adding the width to the div did the trick, thankyou
Bookmarks