| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Nov 2007
Posts: 57
|
Text Allignment-CSS
#wrapper{ width: 757px; height: -550px; margin-left: auto; margin-right: auto; border: 1px solid #000000; text-align: center; background-color:#484745; } ^^everything works in I.E but in firefox everything but the text-align:center. Any ideas? |
|
|
|
|
|
#5 (permalink) | |
|
Semantics, yay.
Join Date: Nov 2005
Location: Salem, Massachusetts
Posts: 1,128
|
Quote:
I'd bet my left arm that there are other issue in your stylesheet that are causing browser inconsistencies. Why don't you post a link to the site so we can be helpful? |
|
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: May 2007
Location: England
Posts: 365
|
Jay-bo you have not taken any notice of pgo WTF comment, although you might think that is rude and sarcastic, that was my thoughts too when looking at that CSS you provided. You have height as a negative value which is illegal for the height property. certainly providing a link to your site will help as we can all look at the complete css and html and spot any errors. You can check for errors yourself by running the CSS and HTML through validator as most of time pages not doing what they should are a result of errors in code, such as having height set as -500px. The W3C CSS Validation Service The W3C Markup Validation Service |
|
|
|
#7 (permalink) |
|
Registered User
Join Date: Nov 2007
Posts: 57
|
body { text-align:-moz-center; #text-align:center; font-family:Arial, Georgia, "Times New Roman", Times, serif; color:white; background-image:url(images/background.jpg); } #wrapper{ width: 757px; height: 550px; margin-left: auto; margin-right: auto; border: 1px solid #000000; background-color:#484745; } #navigation{ display:inline; width:auto; height:auto; } #textbackg{ width:756px; height:333px; background-image:url(images/Template_19.jpg); } h2{ color:#A0A09E; font-size:28px; font-family:Arial, Georgia, "Times New Roman", Times, serif,; } #text{ color:#A0A09E; width:90%; } a:link { color:black; } a:visited { color:black; } a:hover{ color:white; } a:focus{ color:pink; } a:active { color:black; } my code, i have used -moz, which seems to have worked in firefox, is there any other errors i have made, and for some reason on one of them links, it says -moz is wrong when it has worked:S |
|
|
|
#12 (permalink) | |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
Quote:
|
|
|
|
|
#13 (permalink) | |
|
Registered User
Join Date: Nov 2007
Posts: 57
|
Quote:
What are 'Ems'? i know how to do it as an % but how would you write 'Ems'. About that '-moz' i can't see how you can't say it is invaild in css when it works anyway. |
|
|
|
|
#14 (permalink) |
|
Just another web monkey
|
It's invalid CSS because it is browser specific - it works in Firefox (MOZilla Firefox, get it? MOZ ... MOZ -moz) .. but IE/Opera/etc doesn't recognise -MOZZZZZ extensions to CSS Also - ems... Set your base font in the body tag, such as font-size: 1.0em which is the same as font-size: 100% ... you can use font-size: 1.2em which is 120% of the base font-size, etc. p { font-size: 955.2em; color: #ff0000; } MOZ! |
|
![]() |