External file links inheriting CSS - how to stop?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom

    External file links inheriting CSS - how to stop?

    I'm calling an external .js file with plain html links for my
    navigation text area (so I can update it across the site more easily),
    but the links are "inheriting " my css hyperlink qualities. I
    specifically want them NOT to be bold. What code would I add into my
    external .js file to change the font of the navigation links to NOT
    bold? I tried sticking in <font="normal "> in front, but that didn't
    work. I'm a JS newbie, by the way.

    Thanks,
    Tom
  • DB McGee

    #2
    Re: External file links inheriting CSS - how to stop?

    "Tom" <tom.brown42@ve rizon.net> wrote in message
    news:a424d77a.0 311241204.144d3 fcf@posting.goo gle.com...[color=blue]
    > I'm calling an external .js file with plain html links for my
    > navigation text area (so I can update it across the site more easily),
    > but the links are "inheriting " my css hyperlink qualities. I
    > specifically want them NOT to be bold. What code would I add into my
    > external .js file to change the font of the navigation links to NOT
    > bold? I tried sticking in <font="normal "> in front, but that didn't
    > work. I'm a JS newbie, by the way.[/color]


    This sounds like a CSS issue to me. You need to define some CSS styles to
    apply specifically to the navigation text anchors.

    For example:

    a.navtext { font-weight: normal; }

    Then in the HTML for your navigation text:

    <a class="navtext" href="#">Nav Text</a>



    Comment

    • Tom

      #3
      Re: External file links inheriting CSS - how to stop?

      Thanks for the response, DB:

      I'm not sure where you mean to insert the

      <a class="navtext" href="#">Nav Text</a>

      or what href you mean (each individual one below?)...

      Here's my .js file:


      document.write( '<b><font color="#356666" face="Verdana"
      size="2">Depart ments:</font></b> ' + '<a
      href="computer-and-electronics.htm l">Computer & Electronics</a>' + ' |
      <a href="apparel-and-accessories.htm l">Apparel & Accessories</a>' + ' |
      <a href="home-and-garden.html">Ho me & Garden</a>' + ' | <a
      href="kids-and-baby.html">Kids & Baby</a>' + ' | <a
      href="sports-and-outdoors.html"> Sports & Outdoors</a>' + ' | <a
      href="health-and-beauty.html">He alth & Beauty</a>' + ' | <a
      href="flowers-and-gifts.html">Flo wers & Gifts</a>' + ' | <a
      href="shopping-malls-and-department-stores.html">Sh opping Malls &
      Department Stores</a></font>');

      Could you clarify?

      Thanks again,
      Tom

      All-Internet Shopping Directory


      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • Tom Brown

        #4
        Re: External file links inheriting CSS - how to stop?

        DB:
        Could you please edit out my email address from your post?

        Thanks,
        Tom

        Online Stores at All-Internet Shopping Directory


        *** Sent via Developersdex http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        • DB McGee

          #5
          Re: External file links inheriting CSS - how to stop?

          "Tom" wrote in message news:3fc2844e$0 $194$75868355@n ews.frii.net...[color=blue]
          > Thanks for the response, DB:
          >
          > I'm not sure where you mean to insert the
          >
          > <a class="navtext" href="#">Nav Text</a>
          >
          > or what href you mean (each individual one below?)...
          >
          > Here's my .js file:
          >
          >
          > document.write( '<b><font color="#356666" face="Verdana"
          > size="2">Depart ments:</font></b> ' + '<a
          > href="computer-and-electronics.htm l">Computer & Electronics</a>' + ' |
          > <a href="apparel-and-accessories.htm l">Apparel & Accessories</a>' + ' |
          > <a href="home-and-garden.html">Ho me & Garden</a>' + ' | <a
          > href="kids-and-baby.html">Kids & Baby</a>' + ' | <a
          > href="sports-and-outdoors.html"> Sports & Outdoors</a>' + ' | <a
          > href="health-and-beauty.html">He alth & Beauty</a>' + ' | <a
          > href="flowers-and-gifts.html">Flo wers & Gifts</a>' + ' | <a
          > href="shopping-malls-and-department-stores.html">Sh opping Malls &
          > Department Stores</a></font>');
          >
          > Could you clarify?[/color]


          For each of the anchor tags in that javascript block, add a class
          declaration:

          eg. <a class="navtext" href="computer-and-electronics.htm l">Computer &
          Electronics</a>

          Then you just need to add the CSS class declaration 'navtext' to your CSS
          file.


          Comment

          • Fabian

            #6
            Re: External file links inheriting CSS - how to stop?

            Tom Brown hu kiteb:
            [color=blue]
            > DB:
            > Could you please edit out my email address from your post?[/color]

            Tom,

            Once posted, you can't edit a post. Oh, you can send a cancel notice,
            but not all news servers honour those, and in any case it will remain in
            google forever.

            Your only real solution is not to put your email address anywhere you
            might reasonably expect it to be harvested. Putting a used email address
            on usenet (no, your headers are not safe) is really asking for trouble.


            --
            --
            Fabian
            Visit my website often and for long periods!


            Comment

            Working...