border around image link

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

    border around image link


    ok here's my problem my markup is Xhtml strict so i am unable to place
    border="0" in my img tag. I want to be able to get rid of this border
    but have been un able to figure out how to do thi with CSS

    the section that i need to remove the border from is this

    .sub_menu_img A
    {
    PADDING-RIGHT: 0.5em;
    DISPLAY: block;
    PADDING-LEFT: 0.75em;
    BACKGROUND: #fff;
    PADDING-BOTTOM: 1.25ex;
    COLOR: #666;
    LINE-HEIGHT: 1.25em;
    PADDING-TOP: 1.25ex;
    TEXT-DECORATION: none;
    }

    so what do i need to do?

    i have tried:

    BORDER: none

    and

    BORDER-TOP: none;
    BORDER-BOTTOM: none;
    BORDER-LEFT: none;
    BORDER-RIGHT: none

    and neither of these seems to work

    any help would be completly appreciated


    --
    DiGEnig
    ------------------------------------------------------------------------
    DiGEnig's Profile: http://www.highdots.com/forums/m1824
    View this thread: http://www.highdots.com/forums/t3240442

  • Els

    #2
    Re: border around image link

    DiGEnig wrote:
    [color=blue]
    > ok here's my problem my markup is Xhtml strict so i am unable to place
    > border="0" in my img tag. I want to be able to get rid of this border
    > but have been un able to figure out how to do thi with CSS
    >
    > the section that i need to remove the border from is this[/color]

    No, it isn't ;-)
    [color=blue]
    > .sub_menu_img A[/color]

    What is the element that has class 'sub_menu_img' ? Not the image I
    hope? I'll assume it's the parent element around <a>.
    [color=blue]
    > so what do i need to do?[/color]

    The image is having the border, so:

    ..sub_menu_img a img{
    border:none;
    }

    Means: no border on the image that's a child element of the a element
    that's the child of the element with class sub_menu_img .

    --
    Els http://locusmeus.com/
    accessible web design: http://locusoptimus.com/

    Now playing: Jon Anderson - Heart of the Matter

    Comment

    • Johannes Koch

      #3
      Re: border around image link

      Els wrote:[color=blue]
      > ..sub_menu_img a img{
      > border:none;
      > }
      >
      > Means: no border on the image that's a child element of the a element
      > that's the child of the element with class sub_menu_img .[/color]

      s/child/descendant/
      --
      Johannes Koch
      Spem in alium nunquam habui praeter in te, Deus Israel.
      (Thomas Tallis, 40-part motet)

      Comment

      • Els

        #4
        Re: border around image link

        Johannes Koch wrote:
        [color=blue]
        > Els wrote:[color=green]
        >> ..sub_menu_img a img{
        >> border:none;
        >> }
        >>
        >> Means: no border on the image that's a child element of the a element
        >> that's the child of the element with class sub_menu_img .[/color]
        >
        > s/child/descendant/[/color]

        True.

        --
        Els http://locusmeus.com/
        accessible web design: http://locusoptimus.com/

        Now playing: King Crimson - Thela Hun Ginjeet

        Comment

        • Stan McCann

          #5
          Re: border around image link

          DiGEnig <DiGEnig.22hwxz @no-mx.forums.yourd omain.com.au> wrote in
          news:DiGEnig.22 hwxz@no-mx.forums.yourd omain.com.au:
          [color=blue]
          >
          > ok here's my problem my markup is Xhtml strict so i am unable to
          > place border="0" in my img tag. I want to be able to get rid of this
          > border but have been un able to figure out how to do thi with CSS
          >
          > the section that i need to remove the border from is this
          >
          > .sub_menu_img A[/color]

          This is backwards if I understand you correctly. This would set the
          properties for a in a .sub_menu_img class. What you need to do is set
          properties for the image inside an a as in:

          a img { border: 0 }

          or just in that class:

          ..sub_menu_img a img { border: 0 }

          HTH

          --
          Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
          Webmaster/Computer Center Manager, NMSU at Alamogordo
          http://alamo.nmsu.edu/ There are 10 kinds of people.
          Those that understand binary and those that don't.

          Comment

          • DiGEnig

            #6
            Re: border around image link


            Thank you very much that worked
            [color=blue]
            > The image is having the border, so:
            >
            > ..sub_menu_img a img{
            > border:none;
            > }
            >
            > Means: no border on the image that's a child element of the a element
            > that's the child of the element with class sub_menu_img .[/color]

            thanks again for all your help


            --
            DiGEnig
            ------------------------------------------------------------------------
            DiGEnig's Profile: http://www.highdots.com/forums/m1824
            View this thread: http://www.highdots.com/forums/t3240442

            Comment

            Working...