- This topic is empty.
-
AuthorPosts
-
December 27, 2011 at 1:52 pm #35851
Gelias
MemberHopefully someone can help me with this issue.
The issue only occurs when you type something in the search box. The Results page is just shifted all the way to the right for some weird reason. Everything else on the site looks good. The search.php has the same div structure as the whole site and everything looks good just shifted.
Here is a link to the image with the issue
Here is a link to the image of the archives which has same structure and no issue.Hopefully someone can help.
Thanks.
December 27, 2011 at 1:59 pm #93449noahgelman
ParticipantNo, you’re definitely missing either a div tag, or an ID or Class that should be on a div. Or you have an extra div in there causing the issue.
Do you have a link to the website?
December 27, 2011 at 2:13 pm #93451Gelias
MemberIt’s local. Here is the code for the search.php
December 27, 2011 at 2:23 pm #93453noahgelman
ParticipantCan you post the code to a page that looks proper and also the css for “l-inside” and “l-constrained” ?
December 27, 2011 at 2:31 pm #93454Gelias
MemberSure no prob. So here is the archive.php
$arc_year = get_the_time('Y');
$arc_month = get_the_time('m');
$posts = query_posts( "year=$arc_year&monthnum=$arc_month" );
$count = count($posts);
?>
Archive Results for ">"" Results Found
And here is the css
.l-inside {
margin: 0 auto;
width: 960px;
overflow: hidden;
position: relative;
}
.l-constrained {
width: 700px;
float: left;
margin: 0px 10px 5px 0;
}
The issue is that the site shifts. Everything is in place but it shifts half way through the screen.
Thanks again for your help.
December 27, 2011 at 2:39 pm #93455noahgelman
Participant2 differences I see.
1. Your archieves page has a “top-space” class on “.l-constrained”. What is the css for that?
2. While both use an If and While statement, your archieves page closes with only an while your search page closes with both and . That might be your issue.
December 27, 2011 at 2:47 pm #93457Gelias
Membertop-space just adds a margin .top-space { margin-top: 15px;}
Really? the endif might be causing this? I’m going to try and remove the content and just leave the divs and see that fixes it.
December 27, 2011 at 2:48 pm #93460Gelias
MemberEven after removing all the content to just this. Only the search page shifts.
Search Results
December 27, 2011 at 3:15 pm #93465noahgelman
Participanthmmm….. interesting…
My next guess would be something in your header. Your ‘body’ is probably getting a ‘search’ class of some sort (some kind of class to designate it’s the search page) and the page is inheriting some css styles you didn’t intend.
I don’t know how much from scratch you’re building this from, or how much css is still there from the default css but this is my next guess.
December 27, 2011 at 4:35 pm #93481Gelias
MemberYa it just clicked after you said that. I have another div with class search but that’s reserved for wordpress. Thanks for your help Noah. Greatly appreciated
December 27, 2011 at 6:17 pm #93490noahgelman
ParticipantNo problem
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.