SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    Location
    CT
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    stylesheet works in IE and Opera but not in other browsers :/ HELP!!

    hi! please be kind coz this is my first post here.
    i've been working on a website project for my computer science class, and i tried to do most of the styling using CSS. the problem is, everything works fine in IE and Opera, but none of the CSS seems to be rendered in Mozilla or Netscape, with the exception of the main table border.

    i've uploaded the site as it is now, so you can test it yourself. visit http://yeucyprus.com/non-YEU/CS1102/. some links may not work because it's not finished yet.

    what could be the problem? is it because i havent set a DOCTYPE? i actually tried doing that by putting the HMTL transitional one, but then it wouldnt work in IE either so i deleted it. i'm probably missing something.

    while i'm at it, i centered the main table using a DIV and text-align: center;. is this not supported by Opera? because it doesnt work in there. any other suggestions are welcome too. i can upload the CSS file here if you want me to.
    Thank you!!

  2. #2
    SitePoint Member
    Join Date
    Apr 2004
    Location
    CT
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    correction: the text/font styles seem to be working in the other browsers too.

  3. #3
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a few tips.
    Code:
    body { font-family: verdana, helvetica, sans_serif;
        [snip]
        }
    should be
    Code:
    body { font-family: Verdana, Helvetica, sans-serif;
        [snip]
       }
    (Note the underscore changed to a hyphen - making it bold and blue diesn't seem to be terribly visible)

    For the centering, text-align: center won't center block-level content (like tables) Change the following:
    Code:
    #body {
     	text-align: center;
     }
     table#main {
    	border: 1px solid #f30;
    	width: 748px;
         }
    to :
    Code:
         table#main {
    	border: 1px solid #f30;
    	margin-left: auto;
    	margin-right: auto;
    	width: 748px;
         }
    This unclosed style definition:
    Code:
    table {font-size: 10px;
        
        #logo td {
    	padding: 0px;
    	margin: 0px;
        }
    won't be helping at ALL. Add the closing brace.

    offtopic: <rant>Gaaaaaah! quit messing with the indentation, you wretched machine! </rant>

  4. #4
    SitePoint Member
    Join Date
    Apr 2004
    Location
    CT
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    blufive, thank you for your reply and your help.
    i had already tried setting the left and right margins to auto for the table before using the text-align but it didnt work in IE, that's why i used that. i have to say i was only testing the site in IE initially, so i went with whatever worked there i guess.
    so i'm gonna have both settings so that the centering will work in all browsers.

    the site works just perfect in all browsers now. i think it's because i didnt close that brace up there. *feels so embarrased* ehehe i knew it was going to be something like that, but i guess i was too tired to look through the code to find the mistake.

    thank you again!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •