rather strange issue

I’ve got a really strange problem. Basically, I have a block that contains 3 things

<div id="custom-tweet-button"> <ul> <li class="sharethis" id="refresh"><a href="#"></a></li> <li class="twitter"><a href="https://twitter.com/share?hashtags=Anonymously&text=Welcome to Quiet. Why am I here?&via=quiet_app" onClick=" return popitup('https://twitter.com/share?hashtags=Anonymously&text=Welcome to Quiet. Why am I here?&via=quiet_app&url=qph')"></a></li> <li id="comm"></li> </ul> </div>
Its comm that I’m having the issue with. There’s a text number that goes in there, generated on the fly by a jquery call

<script> $(document).ready(function() { $.post("inc/comments_system.php", function(data) { $("#comm").html("<p><a href='#'>"+data.number+"</a></p>"); }, "json"); }); </script>
The number shows up, but thanks to some rather messed up css, (I didn’t code the css, its a prebuilt template) I can’t seem to get the number to show up in the middle of the screen. If I add padding to the top, it pushes the top up instead of moving the text down. If I use margins, it moves all 3 down. I tried putting the link inside of a paragraph, but the same thing happens.

I’m half tempted to just scrap the crappily written css and just redo it. Why would anyone use an ordered list to display 3 things next to each other, its stupid and a completely waste of code.

It might be the positioning of the layer. Perhaps it needs to be “relative” or “absolute” to stay inside the
area? The margin is being placed outside of the link by the sounds of it. Did you try the top-margin in the

  • or inside the ???

    Not much help I guess…

  • I quit trying to figure it out. I made a new container div, added another div in there to center the floated divs and a floated div for each thing.

    only issue now is why the links don’t work.

    Well, you cancel the call to the Anchor’s HREF by using “onClick=” return popitup('https://twitter.com/sha…"

    So, it should call the “popitup” routine which is not shown in your posted code. You should look into
    that routine “popitup” and see what it is doing. Most likely it is not returning a “false” back to the anchor.

    Hmmmm, not sure if that makes sense…

    So, the JQuery you showed is for posting to a file. But, the ONCLICK is for a popitup routine?
    Not sure if I really understand what all this is for?

    But, good luck with it…

    The jquery works, what wasn’t working was the physical placement within the area. The actual link was on top, I got that moved down though. Now I just can’t figure out why its not changing opacity. the css for those things is below

    [code]#floater {
    width: 100%;
    margin: 100px 0;
    text-align: center;
    }
    #floater .left {
    width: 75px;
    height: 50px;
    overflow: hidden;
    opacity: 0.65;
    -webkit-border-radius: 499px;
    -moz-border-radius: 499px;
    border-radius: 499px;
    border: 1px solid #fff;
    float: left;
    margin-right: 15px;
    }
    #floater .left p { margin-top: 9px;}
    #refresh p, #twitter p {margin-top: 9px;}
    #refresh a, #twitter a, #comm a {text-decoration: none;}
    #refresh a:hover, #twitter a:hover {opacity: 1;}
    #refresh a:active, #twitter a:active {opacity: 0.8;}

    #twitter {background: url(…/images/connect-twitter.png) no-repeat center;}
    #refresh {background: url(…/images/connect-sharethis.png) no-repeat center;}[/code]
    and the html

    <div id="floater"> <div id="position" style="margin-left: auto; margin-right: auto; width: 280px;"> <div id="refresh" class="left"><p><a href="#">&nbsp;</a></p></div> <div id="twitter" class="left"><p><a href="https://twitter.com/share?hashtags=Anonymously&text=Welcome to Quiet. Why am I here?&via=quiet_app" onClick=" return popitup('https://twitter.com/share?hashtags=Anonymously&text=Welcome to Quiet. Why am I here?&via=quiet_app&url=qph')">&nbsp;</a></p></div> <div id="comm" class="left"></div> </div> <div style="clear: left;"></div> </div>
    When it was working, each thing would appear to light up when the mouse was moved over it. That’s not working right now.

    problem solved with jquery.

    Great! I’ve seen your work and posts, so I had confidence you would solve it!

    Sponsor our Newsletter | Privacy Policy | Terms of Service