1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

css not working in firefox

Discussion in 'CSS' started by NeilEvan, Dec 5, 2006.

  1. #1
    Here is the code for the problem im having, as per previous thread!


    <html>
    <head>
    <title></title>
    <style type="text/css">
    <!--
    a {
    color: #000000;
    text-decoration: none;
    }
    a:hover {
    color: #000000;
    text-decoration: none;
    }
    a:link {
    color: #000099;
    text-decoration: none;
    }
    .pageprenxt {
    background-image: url("https://lpmtest.vpsland.com/dating/images/Pag_GreenLoz.jpg");
    background-repeat: no-repeat;
    display: in-line;
    height: 24px;
    width: 47px;
    padding: 5px 1px 1px 1px;
    font-weight: bolder;
    font-size: 70%;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    text-align: center;
    vertical-align: middle;
    }
    .pagenormal {
    background-image: url("https://lpmtest.vpsland.com/dating/images/Pag_NumberBackYell.jpg");
    background-repeat: no-repeat;
    display: in-line;
    height: 24px;
    width: 29px;
    padding: 5px 1px 1px 1px;
    font-weight: bolder;
    font-size: 70%;
    color: black;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    vertical-align: middle;
    }
    .pagemouse {
    background-color: #888888;
    padding: 0px 0px 0px 0px;
    font-weight: bolder;
    font-size: 70%;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    }
    .pageout {
    background-image: url("https://lpmtest.vpsland.com/dating/images/Pag_NumberBackGreen.jpg");
    background-repeat: no-repeat;
    display: in-line;
    height: 24px;
    width: 29px;
    padding: 5px 1px 1px 1px;
    font-weight: bolder;
    font-size: 70%;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    vertical-align: middle;
    }
    -->
    </style>
    </head>
    <body>
    <table width="600" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td height="30" width="10"></td>
    <td width="580" align="center">
    <span class="smalltext" valign="middle" align="center">
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=1" text="&lt;&lt;&nbsp;first">&lt;&lt;&nbsp;first</a></span>&nbsp;
    <span class="pageprenxt" align="center" height="24" width="47">
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=11">prev</a></span>
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=21">&nbsp;<span class=pagenormal valign=middle align=center height=24 width=29>&nbsp;1&nbsp;</span></a>
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=31">&nbsp;<span class=pagenormal valign=middle align=center height=24 width=29>&nbsp;2&nbsp;</span></a>
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=41">&nbsp;<span class=pagenormal valign=middle align=center height=24 width=29>&nbsp;3&nbsp;</span></a>
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=51">&nbsp;<span class=pagenormal valign=middle align=center height=24 width=29>&nbsp;4&nbsp;</span></a>
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=61">&nbsp;<span class=pagenormal valign=middle align=center height=24 width=29>&nbsp;5&nbsp;</span></a>
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=71">&nbsp;<span class=pagenormal valign=middle align=center height=24 width=29>&nbsp;6&nbsp;</span></a>
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=81">&nbsp;<span class=pagenormal valign=middle align=center height=24 width=29>&nbsp;7&nbsp;</span></a>
    &nbsp;<span class=pagenormal valign=middle align=center height=24 width=29>&nbsp;8&nbsp;</span>
    <span class="pageprenxt" align="center" height="24" width="47"></span>&nbsp;
    <span class="smalltext" valign="middle" align="center">
    <a href="https://lpmtest.vpsland.com/dating/statistic/list_profile.php?next=4991" text="last&nbsp;&gt;&gt;">last&nbsp;&gt;&gt;</a></span></td>
    <td width="10"></td>
    </tr>
    </table>
    </body>
    </html>



    kind regards
    Neil
     
    NeilEvan, Dec 5, 2006 IP
  2. KLB

    KLB Peon

    Messages:
    1,167
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #2
    For starters, "display: in-line;" is invalid. It should be "display: inline;"

    You should validate your code using W3C's HTML and CSS validators. The easiest way to do this is to get the WebDeveloper extension for Firefox.

    You should also ditch the table tags in favor of using the DIV tag. Really you aren't using tables correctly as they are ONLY supposed to be used for datasets, not presentation.

    You should not be using CSS and HTML tag attributes like "width=40" at the same time. Ditch the attributes and do everything from CSS.

    All attribute strings MUST be in quotes (e.g. class="pagenormal")

    You are trying to use the SPAN tag as a block level attribute, which is totally incorrect. You should be using DIV tags for this purpose and placing the anchor tag inside of the DIV (e.g. <div class="pagenormal"><a href="bla">Bla</a></div>).

    Really you would be better off using an unordered list (e.g. <UL><LI>) to accomplish what you want. The way you are doing it now is way too complicated and messy.
     
    KLB, Dec 5, 2006 IP
  3. NeilEvan

    NeilEvan Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I now have it working. I have it working in FF and IE and safari on the Mac, However because im using Float:left in my style (to stop the graphics becoming vertically aligned, as mentioned before) i have the whole thing now left on my screen as shown.

    If i try to apply an alignment of centre in the styles or a TD align of centre it does not work. Nothing happens.

    If i add a width to the td, then the safari version drops onto two lines, splitting it right after the number 4.

    Any idea how to get this centred?

    Neil

    JPEG attached!
     

    Attached Files:

    NeilEvan, Dec 6, 2006 IP
  4. pachecus

    pachecus Well-Known Member

    Messages:
    1,841
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    110
    #4
    you must change your code.
    <table width="600" border="0" cellpadding="0" cellspacing="0" >
    by this one
    <table width="600" border="0" cellpadding="0" cellspacing="0" align="center">
     
    pachecus, Dec 6, 2006 IP