Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. CSS ImageButton Border not working

CSS ImageButton Border not working

Scheduled Pinned Locked Moved ASP.NET
htmlcssarchitecturehelpquestion
5 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imnotso
    wrote on last edited by
    #1

    Hi, I have a website with 9 ImageButton tags ; etc.... my css file (which is working as when I change the width and height it alters at runtime) does not pick up the border attributes...if I apply them to the image tag in HTML all is fine but then I dont want them in my HTML. CSS file: .HomePageRowOne { border-style:solid; border-right-style:solid; border-right: white 10px solid; border-left: white 10px solid; border-bottom: white 10px solid; border-top: white 10px solid; height: 30%; width: 30%; float: left; } is there a different border command in CSS for ImageButton ? Any help would be great... Harvey

    C 1 Reply Last reply
    0
    • I imnotso

      Hi, I have a website with 9 ImageButton tags ; etc.... my css file (which is working as when I change the width and height it alters at runtime) does not pick up the border attributes...if I apply them to the image tag in HTML all is fine but then I dont want them in my HTML. CSS file: .HomePageRowOne { border-style:solid; border-right-style:solid; border-right: white 10px solid; border-left: white 10px solid; border-bottom: white 10px solid; border-top: white 10px solid; height: 30%; width: 30%; float: left; } is there a different border command in CSS for ImageButton ? Any help would be great... Harvey

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      CSS has no idea what imagebutton is. You should perhaps look at the source that's being generated to see what's happening, perhaps ASP.NET adds some attributes to the controls it uses to create an imagebutton by default.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      I 1 Reply Last reply
      0
      • C Christian Graus

        CSS has no idea what imagebutton is. You should perhaps look at the source that's being generated to see what's happening, perhaps ASP.NET adds some attributes to the controls it uses to create an imagebutton by default.

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        I Offline
        I Offline
        imnotso
        wrote on last edited by
        #3

        Hi Christian, I dont suppose CSS knows what any of them asp: xxxx="" mean but that doesn't stop it applying attributes to the tag, I have changed it to a asp:linkbutton and this puts the borders on fine but cannot set the imageurl in . Is there something about asp:imagebutton that doesn't work?

        modified on Wednesday, March 26, 2008 6:22 PM

        C 1 Reply Last reply
        0
        • I imnotso

          Hi Christian, I dont suppose CSS knows what any of them asp: xxxx="" mean but that doesn't stop it applying attributes to the tag, I have changed it to a asp:linkbutton and this puts the borders on fine but cannot set the imageurl in . Is there something about asp:imagebutton that doesn't work?

          modified on Wednesday, March 26, 2008 6:22 PM

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          What I mean is, you need to look at what the tag is that's being generated, and try to work out from the source, what's going wrong. you need to check 'Ignore HTML tags in this message (good for code snippets)' if you want to paste HTML into your reply.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          I 1 Reply Last reply
          0
          • C Christian Graus

            What I mean is, you need to look at what the tag is that's being generated, and try to work out from the source, what's going wrong. you need to check 'Ignore HTML tags in this message (good for code snippets)' if you want to paste HTML into your reply.

            Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            I Offline
            I Offline
            imnotso
            wrote on last edited by
            #5

            Thanks, good idea. It's not taking the attributes on (not a shock really) if anyone has any idea? Thanks

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups