Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

CSS help needed!

Options
  • 24-03-2006 12:17am
    #1
    Registered Users Posts: 1,086 ✭✭✭


    On my site I have to insert this javascript include (below).
    <script language="javascript">
    var uri = 'http://impie.tradedoubler.com/imp/js/13114156/1202708?' + new String (Math.random()).substring (2, 11);
    document.write('<sc'+'ript language="JavaScript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
    </script>
    

    When I include the file it screws up some of my link font and size. I know this file is the culprit because when I comment it out the problem does not appear. Below I have pasted the code section which I think may be overriding my font and size settings.
    <STYLE>td{	font-family:verdana;	font-size:12px;}.bttn {font-size: 11px;color: #ffffff;font-weight:bold;background-color: #ff6600;border: 1px solid #ffffff ; cursor: pointer;border: 2px outset #ffffff;}.myBG{	background-image: url(\"http://ebookers.m7z.net/content1.ebookers.com/images/IE/new_searchtabs/booking_engine_hc.gif\");	background-repeat: no-repeat;}<\/STYLE>
    

    In my html file how do avoid my link styles being overwritten by this "foreign" file.


Comments

  • Closed Accounts Posts: 184 ✭✭tvbrat


    Peter B wrote:
    On my site I have to insert this javascript include (below).
    <script language="javascript">
    var uri = 'http://impie.tradedoubler.com/imp/js/13114156/1202708?' + new String (Math.random()).substring (2, 11);
    document.write('<sc'+'ript language="JavaScript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
    </script>
    
    When I include the file it screws up some of my link font and size. I know this file is the culprit because when I comment it out the problem does not appear. Below I have pasted the code section which I think may be overriding my font and size settings.
    <STYLE>td{    font-family:verdana;    font-size:12px;}.bttn {font-size: 11px;color: #ffffff;font-weight:bold;background-color: #ff6600;border: 1px solid #ffffff ; cursor: pointer;border: 2px outset #ffffff;}.myBG{    background-image: url(\"http://ebookers.m7z.net/content1.ebookers.com/images/IE/new_searchtabs/booking_engine_hc.gif\");    background-repeat: no-repeat;}<\/STYLE>
    
    In my html file how do avoid my link styles being overwritten by this "foreign" file.


    Hi Peter B

    I think this is the problem
    <STYLE>td{    font-family:verdana;    font-size:12px;}
    
    If your links are in a table, they will be affected by the td tag
    If you put your links in a div tag and give it a name, then assign
    it a style in your own style sheet, this should overcome the problem
    Hope this works for you


  • Closed Accounts Posts: 519 ✭✭✭smeggle


    Or you could over ride the style and directly target the problem td

    i.e
    <td style="place styling here - font-family:verdana;font-size:12px;"> 
    

    That will specifically override the td styling for that particular area - all other td will be unaffected.

    if your doing it like this
    <table>
    <tr>
    <td></td>
    </tr>
    </table>
    

    In other words using individual tables for each area then the style can be over ridden in the table tag as well like so
    <table style="input style here">
    <tr>
    <td></td>
    </tr>
    </table>
    

    This way, your directly over riding your implied global td style or table style ..

    :)


  • Closed Accounts Posts: 184 ✭✭tvbrat


    smeggle wrote:
    Or you could over ride the style and directly target the problem td

    i.e
    <td style="place styling here - font-family:verdana;font-size:12px;"> 
    
    That will specifically override the td styling for that particular area - all other td will be unaffected.

    if your doing it like this
    <table>
    <tr>
    <td></td>
    </tr>
    </table>
    
    In other words using individual tables for each area then the style can be over ridden in the table tag as well like so
    <table style="input style here">
    <tr>
    <td></td>
    </tr>
    </table>
    
    This way, your directly over riding your implied global td style or table style ..

    :)


    Hi Smeggle
    Your right that would work very well indeed, I'm just not a fan
    of tables, but as its a table problem, I think your solution is a
    better one then mine


  • Closed Accounts Posts: 519 ✭✭✭smeggle


    tvbrat wrote:
    Hi Smeggle
    Your right that would work very well indeed, I'm just not a fan
    of tables, but as its a table problem, I think your solution is a
    better one then mine

    Yeah - not a fan of tables myself but they have there uses sometimes - and it's a handy cheat for probs like this, just had to use it at my own place lol

    :)


  • Closed Accounts Posts: 184 ✭✭tvbrat


    smeggle wrote:
    Yeah - not a fan of tables myself but they have there uses sometimes - and it's a handy cheat for probs like this, just had to use it at my own place lol

    :)

    Yea tables can and do work, its just takes some extra care when
    using them.

    Some of the time using tables for layout can be ok,
    the big problems can arise when you have to present data
    such as a spreadsheet or a timetable.

    Mind you, using a summary can help to describe the relationship among table cells and cells that span multiple columns and/or rows

    This should help in making sure that they linearise propelery, i.e. the content is converted into standard paragraphs, and is in the right order, so that screen readers can access them. Because when tables are used to present text in a word-wrapped mannor, parallel columns containing the information may become jumbled.

    I Do use tables myself, however I always try to use the div tag with css, if I can, but sometimes this does not work on older browsers or does not work accross a broad range of browsers on various operating systems.

    The table is dead...
    Long live the table...


  • Advertisement
Advertisement