WordPress.org

Ready to get started?Download WordPress

Forums

Random CSS in IE question.. (10 posts)

  1. ttj90
    Member
    Posted 2 years ago #

    Eyup,

    I've implemented a couple of plugins; one a FB and the other a Twitter so I can share stuff out. Being an anal perfectionist I wanted the ShareThis plugin with official buttons but ShareThis don't do them very well but I still wanted the ShareThis plugin so I manually stuck it into the single.php with a little css amendments so that everything sits together neatly, in alignment and level.

    It works in everything other than...... drum roll..... Internet Explorer.

    Surprised? Thought not.

    So, this is what I did:

    <div style="position: absolute; margin-left:100px; margin-top:30px"><span class='st_sharethis_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='share'></span><span class='st_plusone_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='share'></span></div>

    The top line obviously is the handmade code but what am I doing wrong so that it doesn't align in IE?

  2. ttj90
    Member
    Posted 2 years ago #

    Oh! And on the SFC,

    I'm getting this in the FB Linter:

    Inferred Property The og:locale property should be explicitly provided, even if a value can be inferred from other tags.

    That's my only gripe with this plugin. Hardly a gripe at all is it?!
    Any ideas on how to amend this?

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 2 years ago #

    The og:locale is an optional meta tag. Doesn't need to be there.

    That said, next version of SFC will have it anyway.

  4. ttj90
    Member
    Posted 2 years ago #

    Ok. It is minor I know, just being an anal perfectionist aforementioned.

    No idea on the top comment then I guess?

  5. hilmon
    Member
    Posted 2 years ago #

    <div style="position: absolute; margin-left:100px; margin-top:30px">

    If your positioning is absolute you might as well not use margins and use

    <div style="position:absolute; left:100px; top:30px">

    Make sure that the parent of your div has position:relative or position:absolute.

    Just installed SFC ... looking forward to seeing what it can do :-)

  6. ttj90
    Member
    Posted 2 years ago #

    Hilmon, you're a gentleman, Sir.

    SFC takes some massive pain away.

    I might add that you may need to alter the dimensions of the 'Like' buttons in the '/like.php' to render them the way that you like.

    I've also installed the Simple Twitter Connect as well and that too is pretty fab. I don't have much luck with plugins as a rule but with these two; nothing. *touching wood

  7. ttj90
    Member
    Posted 2 years ago #

    Nah, that's put the link those dimensions from the actual screen rather than within the post...

  8. hilmon
    Member
    Posted 2 years ago #

    That's why the parent container of your div needs to be position:relative. Then your div's absolute position will be relative to the parent... not the screen.

  9. hilmon
    Member
    Posted 2 years ago #

    <div style="position:relative; width:100px; height:100px; top:100px; left:100px; background:red;">
      <div style="position:absolute; width:50px; height:50px; top:10px; left:10px; background:black;"></div>
    </div>

    See what I mean!!!

  10. ttj90
    Member
    Posted 2 years ago #

    Yeah, I believe I do.

    But no, that doesn't work either.

    I'll have to investigate further with the plugins I'm using as they are getting in the way. I'll have to place them all elsewhere or differently.

    Thanks for you help and patience.

Topic Closed

This topic has been closed to new replies.

About this Topic