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
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;
sirsimplysaw
Member
Posted 2 years ago #
i couldnt find the code, any other advice ?
many thanks
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.
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.
sirsimplysaw
Member
Posted 2 years ago #
i look everywhere and i still couldnt find the code
any other advice ?
many thanks
TransPersonal
Member
Posted 2 years ago #
Are you using some type of plugin for the gallery?
sirsimplysaw
Member
Posted 2 years ago #
nop, just the regular gallery in wordpress
TransPersonal
Member
Posted 2 years ago #
Alright, last option: post the link where you downloaded your theme.
sirsimplysaw
Member
Posted 2 years ago #
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.
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
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.
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
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/
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 ?
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
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.
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 !!!
Please do try my suggestion. I really, really think it might work for you. ;)
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
It's looking fine for me now. Have you tried emptying your browser cache and reloading?
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
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;
}
sirsimplysaw
Member
Posted 2 years ago #
sirsimplysaw
Member
Posted 2 years ago #
omg finally it is solve
thanks alot TransPersonal and SpankMarvin
i really appreciate it
no problem, glad it's sorted!!