SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2010
    Posts
    453
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Need to remove hidden div from the flow

    I just discovered that hover doesn't work on my mobile device. So, I'm trying to create a similar effect with JS. My problem is I can't get my hidden div out of the flow.

    I load my page like this and the hidden div disrupts all the placement around the button when it appears. What to do?
    Code:
    echo '<button class="button0" onclick="showDiv(this.value)" value="xyz">Item Info</button>';
    echo '<div id="linkContainer2" style="display:none;">';
    CSS:
    Code:
    #linkContainer2 {
    background-color: yellow;
    width: 300px;
    height: 50px;
    margin: 0px 0px 0px 105px;
    }

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2010
    Posts
    453
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I see it. I needed to close the div.

    I also changed the position to absolute.

    On to the next issue.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •