![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
text-align:center is not working in FF for body... code: |
|
body {background-image:url(bg2.jpg); margin-top:0; margin-left:0; margin-right:0; margin-bottom:0; text-align:center; background-attachment:fixed;} in body I have a div, of a specific width, it's not centered in FF... for div also put text-align:center, inside the div it works fine, content is centered... (but div is not centered in browser window.. if I put plain text ABOVE the div, it's centered, but the div is not centered..) |
#3
| |||
| |||
|
|
On Sun, 14 Oct 2007 18:04:16 +0200, maya <maya778899 (AT) yahoo (DOT) com> wrote: text-align:center is not working in FF for body... code: It does. body {background-image:url(bg2.jpg); margin-top:0; margin-left:0; margin-right:0; margin-bottom:0; text-align:center; background-attachment:fixed;} in body I have a div, of a specific width, it's not centered in FF... for div also put text-align:center, inside the div it works fine, content is centered... (but div is not centered in browser window.. if I put plain text ABOVE the div, it's centered, but the div is not centered..) A DIV is a block, not text. Use something like div{margin:0 auto;} to center it. |
what does 'auto' do?? (and why would how
#4
| |||
| |||
|
|
Rik Wasmus wrote: On Sun, 14 Oct 2007 18:04:16 +0200, maya <maya778899 (AT) yahoo (DOT) com> wrote: text-align:center is not working in FF for body... code: It does. body {background-image:url(bg2.jpg); margin-top:0; margin-left:0; margin-right:0; margin-bottom:0; text-align:center; background-attachment:fixed;} in body I have a div, of a specific width, it's not centered in FF... for div also put text-align:center, inside the div it works fine, content is centered... (but div is not centered in browser window.. if I put plain text ABOVE the div, it's centered, but the div is not centered..) A DIV is a block, not text. Use something like div{margin:0 auto;} to center it. thank you.. that worked... what does 'auto' do?? (and why would howmuch margin for the div make a difference??) thank you very much.. |
![]() |
| Thread Tools | |
| Display Modes | |
| |