Lines under links, not under pictures...

Discussion in 'HTML' started by Zadig Galbaras, Mar 18, 2008.

  1. Hi...

    I have set up this for links in my css-file - border-bottom: 1px dotted
    #0000FF; -
    But then I get this dotted border also under pictures.
    Is there a way to avoid this properties to a link on a picture, and still
    using the same css-file?

    --

    Regards
    Zadig Galbaras
    (nick)
    www.tresfjording.com
    -----
     
    Zadig Galbaras, Mar 18, 2008
    #1
    1. Advertising

  2. Zadig Galbaras wrote:
    > Hi...
    >
    > I have set up this for links in my css-file - border-bottom: 1px dotted
    > #0000FF; -
    > But then I get this dotted border also under pictures.
    > Is there a way to avoid this properties to a link on a picture, and
    > still using the same css-file?
    >


    a img { border: 0; }

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Mar 18, 2008
    #2
    1. Advertising

  3. Thank you JNL...
    ....but I don't seem to get it to work....

    I've copied your line into my csss-file, but no fix...
    I've pasted into the styla tag in the code of teh page itself, but in
    vain...
    I've run outof ideas...

    --

    Regards
    Zadig Galbaras
    (nick)
    www.tresfjording.com
    -----



    "Jonathan N. Little" <> skrev i melding
    news:69185$47dfc4e5$40cba7c2$...
    > Zadig Galbaras wrote:
    >> Hi...
    >>
    >> I have set up this for links in my css-file - border-bottom: 1px dotted
    >> #0000FF; -
    >> But then I get this dotted border also under pictures.
    >> Is there a way to avoid this properties to a link on a picture, and still
    >> using the same css-file?
    >>

    >
    > a img { border: 0; }
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIO
    > http://www.LittleWorksStudio.com
     
    Zadig Galbaras, Mar 18, 2008
    #3
  4. Zadig Galbaras

    SAZ Guest

    In article <47e006df$>, says...
    > Thank you JNL...
    > ...but I don't seem to get it to work....
    >
    > I've copied your line into my csss-file, but no fix...
    > I've pasted into the styla tag in the code of teh page itself, but in
    > vain...
    > I've run outof ideas...
    >
    >

    Please post the URL. There could be something else in your code causing
    this.
     
    SAZ, Mar 18, 2008
    #4
  5. SAZ wrote:
    > In article <47e006df$>, says...
    >> Thank you JNL...
    >> ...but I don't seem to get it to work....
    >>
    >> I've copied your line into my csss-file, but no fix...
    >> I've pasted into the styla tag in the code of teh page itself, but in
    >> vain...
    >> I've run outof ideas...
    >>
    >>

    > Please post the URL. There could be something else in your code causing
    > this.


    most likely specificity, but who know without seeing his stylesheet and
    markup in question...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Mar 18, 2008
    #5
  6. ..oO(Jonathan N. Little)

    >SAZ wrote:
    >> In article <47e006df$>, says...
    >>> Thank you JNL...
    >>> ...but I don't seem to get it to work....
    >>>
    >>> I've copied your line into my csss-file, but no fix...
    >>> I've pasted into the styla tag in the code of teh page itself, but in
    >>> vain...
    >>> I've run outof ideas...
    >>>
    >>>

    >> Please post the URL. There could be something else in your code causing
    >> this.

    >
    >most likely specificity


    Nope. He has applied underlines to his links like this:

    a {border-bottom: 1px dotted #00F}

    Of course this also affects image links. But the underlines are applied
    to the 'a' elements, not to the images, so this:

    a img {border: 0}

    does _not_ work as intended, because the images don't have any border
    (let aside browser defaults).

    Currently CSS doesn't allow to select elements that have a particular
    descendant, which would be required here. IMHO applying a class to the
    image links is currently the only way to solve this issue:

    <a href="..." class="img"><img src="..." alt="..."></a>

    a.img {border: 0}

    Micha
     
    Michael Fesser, Mar 18, 2008
    #6
  7. My site: www.tresfjording.com
    My css file is a mess, because I've just started learning...
    http://www.tresfjording.com/css/granbergMain.css
    A lot of things there I don't use, but every time I try to take something
    away, something mess up....

    And Michael; Your trick didn't do it...

    I have this INDEX.PHP which uses the PHP code
    <?PHP
    include("topp.htm");
    ?>
    and
    <?PHP
    include("left.htm");
    ?>
    and
    <?PHP
    include("right.htm");
    ?>
    That to make it easier to make changes in these areas of the screen.
    Also, I don't want to use frames, because of that tooltip function. They
    seem to not cross frame border and they are halfway hidden behind the
    neighboring frame...
    I tried <iframe>, but that messed up the page completely....

    So.... I hva one option left, I know will work and that is to make a
    map-link on the picture in question.
    That'll work, I'm pretty sure...And the dotted line is gone... but probalby
    return when hovering over the image... :-(

    --

    Regards
    Zadig Galbaras
    (nick)
    www.tresfjording.com
    -----



    "Michael Fesser" <> skrev i melding
    news:...
    > .oO(Jonathan N. Little)
    >
    >>SAZ wrote:
    >>> In article <47e006df$>, says...
    >>>> Thank you JNL...
    >>>> ...but I don't seem to get it to work....
    >>>>
    >>>> I've copied your line into my csss-file, but no fix...
    >>>> I've pasted into the styla tag in the code of teh page itself, but in
    >>>> vain...
    >>>> I've run outof ideas...
    >>>>
    >>>>
    >>> Please post the URL. There could be something else in your code causing
    >>> this.

    >>
    >>most likely specificity

    >
    > Nope. He has applied underlines to his links like this:
    >
    > a {border-bottom: 1px dotted #00F}
    >
    > Of course this also affects image links. But the underlines are applied
    > to the 'a' elements, not to the images, so this:
    >
    > a img {border: 0}
    >
    > does _not_ work as intended, because the images don't have any border
    > (let aside browser defaults).
    >
    > Currently CSS doesn't allow to select elements that have a particular
    > descendant, which would be required here. IMHO applying a class to the
    > image links is currently the only way to solve this issue:
    >
    > <a href="..." class="img"><img src="..." alt="..."></a>
    >
    > a.img {border: 0}
    >
    > Micha
     
    Zadig Galbaras, Mar 18, 2008
    #7
  8. I've tested the map-link thingy, and it works fine...

    --

    Regards
    Zadig Galbaras
    (nick)
    www.tresfjording.com
    -----



    "Zadig Galbaras" <> skrev i melding
    news:47e013ea$...
    > My site: www.tresfjording.com
    > My css file is a mess, because I've just started learning...
    > http://www.tresfjording.com/css/granbergMain.css
    > A lot of things there I don't use, but every time I try to take something
    > away, something mess up....
    >
    > And Michael; Your trick didn't do it...
    >
    > I have this INDEX.PHP which uses the PHP code
    > <?PHP
    > include("topp.htm");
    > ?>
    > and
    > <?PHP
    > include("left.htm");
    > ?>
    > and
    > <?PHP
    > include("right.htm");
    > ?>
    > That to make it easier to make changes in these areas of the screen.
    > Also, I don't want to use frames, because of that tooltip function. They
    > seem to not cross frame border and they are halfway hidden behind the
    > neighboring frame...
    > I tried <iframe>, but that messed up the page completely....
    >
    > So.... I hva one option left, I know will work and that is to make a
    > map-link on the picture in question.
    > That'll work, I'm pretty sure...And the dotted line is gone... but
    > probalby return when hovering over the image... :-(
    >
    > --
    >
    > Regards
    > Zadig Galbaras
    > (nick)
    > www.tresfjording.com
    > -----
    >
    >
    >
    > "Michael Fesser" <> skrev i melding
    > news:...
    >> .oO(Jonathan N. Little)
    >>
    >>>SAZ wrote:
    >>>> In article <47e006df$>,
    >>>> says...
    >>>>> Thank you JNL...
    >>>>> ...but I don't seem to get it to work....
    >>>>>
    >>>>> I've copied your line into my csss-file, but no fix...
    >>>>> I've pasted into the styla tag in the code of teh page itself, but in
    >>>>> vain...
    >>>>> I've run outof ideas...
    >>>>>
    >>>>>
    >>>> Please post the URL. There could be something else in your code
    >>>> causing
    >>>> this.
    >>>
    >>>most likely specificity

    >>
    >> Nope. He has applied underlines to his links like this:
    >>
    >> a {border-bottom: 1px dotted #00F}
    >>
    >> Of course this also affects image links. But the underlines are applied
    >> to the 'a' elements, not to the images, so this:
    >>
    >> a img {border: 0}
    >>
    >> does _not_ work as intended, because the images don't have any border
    >> (let aside browser defaults).
    >>
    >> Currently CSS doesn't allow to select elements that have a particular
    >> descendant, which would be required here. IMHO applying a class to the
    >> image links is currently the only way to solve this issue:
    >>
    >> <a href="..." class="img"><img src="..." alt="..."></a>
    >>
    >> a.img {border: 0}
    >>
    >> Micha

    >
     
    Zadig Galbaras, Mar 18, 2008
    #8
  9. now it works just like I wanted it to...

    :))

    --

    Regards
    Zadig Galbaras
    (nick)
    www.tresfjording.com
    -----



    "Zadig Galbaras" <> skrev i melding
    news:47dfc446$...
    > Hi...
    >
    > I have set up this for links in my css-file - border-bottom: 1px dotted
    > #0000FF; -
    > But then I get this dotted border also under pictures.
    > Is there a way to avoid this properties to a link on a picture, and still
    > using the same css-file?
    >
    > --
    >
    > Regards
    > Zadig Galbaras
    > (nick)
    > www.tresfjording.com
    > -----
    >
    >
    >
     
    Zadig Galbaras, Mar 18, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack
    Replies:
    9
    Views:
    2,727
  2. Joe Wright
    Replies:
    0
    Views:
    544
    Joe Wright
    Jul 27, 2003
  3. lovecreatesbeauty

    How to know two lines are a pare parallel lines

    lovecreatesbeauty, Apr 27, 2006, in forum: C Programming
    Replies:
    11
    Views:
    686
    Old Wolf
    Apr 28, 2006
  4. Martin Raychev
    Replies:
    1
    Views:
    294
    Alvin Bruney [MVP]
    Mar 2, 2004
  5. Mikaël Hautin

    Links & Pictures

    Mikaël Hautin, Jun 1, 2005, in forum: Javascript
    Replies:
    2
    Views:
    100
    David Dorward
    Jun 1, 2005
Loading...

Share This Page