Forums

[resolved] why there are huge gap between my pictures ? (27 posts)

  1. sirsimplysaw
    Member
    Posted 2 years ago #

    Hi there,

    I am still quite nex with wordpress, i m just wondering any of you can assist me with my problem.

    I tried adding pictures in gallery format but somehow there are VERY HUGE gap between the first line of the pictures with the second. I cant understand why is this happening. I am wondering any of you can help me with this. Thanks

    my link is http://sirsimplysaw.com

  2. TransPersonal
    Member
    Posted 2 years ago #

    Locate this block of code in your stylesheet (go to Themes >> Editor >> Style.css):

    #gallery-1 .gallery-item {
    float:left;
    margin-top:10px;
    text-align:center;
    width:50%;
    }

    Change the last line to:

    width: auto;

  3. sirsimplysaw
    Member
    Posted 2 years ago #

    i couldnt find the code, any other advice ?

    many thanks

  4. TransPersonal
    Member
    Posted 2 years ago #

    Apparently this is embedded css. Go to your header.php in the theme editor and look for this:

    <style type='text/css'>
    #gallery-1 {
    margin: auto;
    }
    #gallery-1 .gallery-item {
    float: left;
    margin-top: 10px;
    text-align: center;
    width: 50%; }
    #gallery-1 img {
    border: 2px solid #cfcfcf;
    }
    #gallery-1 .gallery-caption {
    margin-left: 0;
    }
    </style>

    and change the width's value to auto.

  5. TransPersonal
    Member
    Posted 2 years ago #

    On second thought it is most likely outside of header.php. Just look through all your theme files until you find the above code.

  6. sirsimplysaw
    Member
    Posted 2 years ago #

    i look everywhere and i still couldnt find the code
    any other advice ?

    many thanks

  7. TransPersonal
    Member
    Posted 2 years ago #

    Are you using some type of plugin for the gallery?

  8. sirsimplysaw
    Member
    Posted 2 years ago #

    nop, just the regular gallery in wordpress

  9. TransPersonal
    Member
    Posted 2 years ago #

    Alright, last option: post the link where you downloaded your theme.

  10. sirsimplysaw
    Member
    Posted 2 years ago #

  11. TransPersonal
    Member
    Posted 2 years ago #

    Okay, I checked through the theme myself and found out that the css for the gallery comes from the core wordpress files. Since modifying these aren't a good idea try adding this at the bottom of your style.css:

    #gallery-1 .gallery-item {
    float:left;
    margin-top:10px;
    text-align:center;
    width:auto !important;
    }

    If this doesn't work let me know.

  12. sirsimplysaw
    Member
    Posted 2 years ago #

    i am really sorry to disturb u again but i try adding the code at the bottom but unfortunately is still the same. I tried deleting the previous gallery n upload the new one but the problem still exist

    do advice from here

    thanks

  13. SpankMarvin
    Member
    Posted 2 years ago #

    Annoying, but try adding containers to the beginning, i.e.

    instead of

    #gallery-1 .gallery-item

    try

    #content #gallery-1 .gallery-item

    to see whether this helps override the values.

  14. sirsimplysaw
    Member
    Posted 2 years ago #

    hahahah
    it is still the same
    i really appreciate every advice u given me but i dont know why the problem still there .

    is there any other way i could add pictures into gallery ?
    like some plug in or something

    thanks

  15. TransPersonal
    Member
    Posted 2 years ago #

    This is the most popular plugin for that, you can try it:

    http://wordpress.org/extend/plugins/nextgen-gallery/

  16. sirsimplysaw
    Member
    Posted 2 years ago #

    thanks alot
    does it serve the same purpose as the regular gallery ?
    i can put the gallery in my post ?

  17. SpankMarvin
    Member
    Posted 2 years ago #

    There needs to be a gap between #content and the rest of the code in your css. Insert a gap and I reckon it'll work.

    I.e.

    #content#gallery-1 .gallery-item

    becomes

    #content #gallery-1 .gallery-item

  18. TransPersonal
    Member
    Posted 2 years ago #

    does it serve the same purpose as the regular gallery ?
    i can put the gallery in my post ?

    Yes and you can do a lot more with that plugin. But try what SpankMarvin suggested as a last try.

  19. sirsimplysaw
    Member
    Posted 2 years ago #

    ok now even using NextGen i dont know why there are a HUGE gap between the words and gallery .

    HELPPP !!!

  20. SpankMarvin
    Member
    Posted 2 years ago #

    Please do try my suggestion. I really, really think it might work for you. ;)

  21. sirsimplysaw
    Member
    Posted 2 years ago #

    i tried and i think it works but the huge gap is still even
    no matter i use conventional gallery or NextGen
    the bladly GAP is still there
    any idea why ?

    see it at http://www.sirsimplysaw.com

  22. SpankMarvin
    Member
    Posted 2 years ago #

    It's looking fine for me now. Have you tried emptying your browser cache and reloading?

  23. sirsimplysaw
    Member
    Posted 2 years ago #

    i empty the cache it still the same
    the first 2 pictures on top then there are a HUGE GAP then the rest of the gallery appear normally. I dont understand why there are a HUGE GAP there

  24. SpankMarvin
    Member
    Posted 2 years ago #

    OOOOhhh, I was only looking at the top images, thinking these were the only ones.

    Ok, add the following and let me know:

    #content .gallery {
    display: block;
    overflow:hidden;
    }
  25. sirsimplysaw
    Member
    Posted 2 years ago #

    where should i add it ?

  26. sirsimplysaw
    Member
    Posted 2 years ago #

    omg finally it is solve
    thanks alot TransPersonal and SpankMarvin

    i really appreciate it

  27. SpankMarvin
    Member
    Posted 2 years ago #

    no problem, glad it's sorted!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags