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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Text in a Div is pushing icon to the next line. How do I stop this?

Text in a Div is pushing icon to the next line. How do I stop this?

Scheduled Pinned Locked Moved ASP.NET
questionarchitecture
4 Posts 2 Posters 0 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.
  • M Offline
    M Offline
    McTartan
    wrote on last edited by
    #1

    I have a div which is misbehaving badly. It seems that some very long text entered into this "tableItem" is causing the icon within the div to be pushed down to the next line. How do I stop this maddening behavior?

       ![Select Items](~/Images/search.png)
    

    .itemStyle {
    border: 1px solid #cccccc;
    border-radius: 6px;
    display: inline-block;
    padding: 3px 3px 3px 3px;
    white-space: nowrap;
    margin: 0;
    /*overflow: hidden;*/
    height: 20px;
    }

    .SearchIconStyle {
    cursor: pointer;
    margin-top: 2px;
    margin-right: 2px;
    }

    J 1 Reply Last reply
    0
    • M McTartan

      I have a div which is misbehaving badly. It seems that some very long text entered into this "tableItem" is causing the icon within the div to be pushed down to the next line. How do I stop this maddening behavior?

         ![Select Items](~/Images/search.png)
      

      .itemStyle {
      border: 1px solid #cccccc;
      border-radius: 6px;
      display: inline-block;
      padding: 3px 3px 3px 3px;
      white-space: nowrap;
      margin: 0;
      /*overflow: hidden;*/
      height: 20px;
      }

      .SearchIconStyle {
      cursor: pointer;
      margin-top: 2px;
      margin-right: 2px;
      }

      J Offline
      J Offline
      John C Rayan
      wrote on last edited by
      #2

      Which table item are you referring to ? I can't see any text in your table item.

      M 1 Reply Last reply
      0
      • J John C Rayan

        Which table item are you referring to ? I can't see any text in your table item.

        M Offline
        M Offline
        McTartan
        wrote on last edited by
        #3

        I attempted to add an image, but I do not believe I was able to do that. The text gets put into the div via the code-behind, and could be anything, since it is data that comes from a database. At any rate, I believe we have solved this issue, or come very close to solving it. For one, I believe we put in a break "
        ", which appears to have helped. Also, I think a good bit of the supporting JavaScript had to be modified. Thanks all for your assistance. Have a great weekend!!

        J 1 Reply Last reply
        0
        • M McTartan

          I attempted to add an image, but I do not believe I was able to do that. The text gets put into the div via the code-behind, and could be anything, since it is data that comes from a database. At any rate, I believe we have solved this issue, or come very close to solving it. For one, I believe we put in a break "
          ", which appears to have helped. Also, I think a good bit of the supporting JavaScript had to be modified. Thanks all for your assistance. Have a great weekend!!

          J Offline
          J Offline
          John C Rayan
          wrote on last edited by
          #4

          Thanks for the update!

          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