I’m working on a div overlay for my myspace page and depending on the browser that I use to view my page (IE, moz, or opera) looks different. I have one main div container in the center and then I place all my content into tables which I split into 2 different rows and columns. Then the only additional floating objects on my page are my rollover buttons and my rollover top friends list. All my rollover buttons look fine in each browser but for some reason my rollover top friends at the bottom of my page are off by about 200px in opera and IE, but look fantastic in firefox. I noticed that my linebreaks are different sizes in all 3 browsers and I reckon this may be what is making the problem. Anyway to fix this?

Also could I maybe just make 2 or 3 completely different style sheets for different browsers? Not sure if that is a possibility with myspace.

3 Responses to “I have some css and html questions (advanced coders only please!)?”

  • Vera:

    You shouldn’t place divs inside tables. Tables are not supposed tobe used for layouts.

    http://tutorialtastic.co.uk/tutorial/create_a_tableless_layout
    ^ that should help you. It works in all browsers.

    yes, you can make a different stylesheet for IE, by putting the subsequent in your HTML papers head section

  • shadow:

    look, make two stylesheets one named ‘IE.css’ and the additional ‘OTHERS.css’ Then replace the HTML tag with this javascript:

    if(window.event)
    {
    document.write(‘ ‘);
    }
    else
    {
    document.write(‘ ‘);
    }

    This will give the appropiate stylesheet according to the browser.

    Hope it works

  • Archer:

    the 2 answers will work in most cases. but, i know myspace blocks javascript.

    so, your solution should be CSS code that both IE and Opera will ignore but FireFox will see which is a backslash ” at the end of the CSS code block

    try this:

    marker
    target

    #marker, #target {code}
    #target {code} <—- see the backslash [no white space after it]
    #target{code}

    after that IE and Op will ignore declared values inside the next block of code but FireFox will overwrite it. i placed ‘! vital’ in text-align in the next code block to show IE & Op will still ignore it. remember, no whitespace or anything after the or it wont work

Leave a Reply