Positioning help needed... again lol...

User 38401 Photo


Senior Advisor
10,951 posts

Hiya guys,

I don't know why I can't seem to figure this out, but I'm getting bald trying lol. I got help a while ago on how to set this all up for CSS positioning for all my parts and pieces for my theme, but for some reason the spacing between the top bar with the Menu on it and the content area has grown hugely and I can't seem to figure out how to get rid of the excess space without totally screwing up the rest of the page lol.

http://accessoriesoftheworld.com is the page that has the trouble, and I need it to line up similar to:
http://accessoriesoftheworld.com/shop so that they look the same. You'll see that the space on the shop page is way smaller than that on the html external page.

Any assistance would be most appreciated. I really need to find a good tutorial on CSS positioning stuff, it really still baffles me quite a bit :/

Let me know what you need me to show you if anything. I'm going to assume most of you can grab the code so if you need it just hollar :)
User 463058 Photo


Ambassador
1,086 posts

Well, the gap is definitely related to the menu. When javascript is turned off, the gap vanishes.
User 562592 Photo


Registered User
2,038 posts

You can set negative margins for your content area, which would bring it up further.
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 205914 Photo


Ambassador
23 posts

may I suggest using PHP to fix this? I could show you how to do this and it takes about 3 minutes.


Dave Stevens
FM Web Solutions | Lead Designer
fieldmedics4@gmail.com
www.fmwebsolutions.org
User 38401 Photo


Senior Advisor
10,951 posts

Thanks guys,

@Dave, I'm open to suggestions, although I know little about PHP so hopefully it's easy enough to do.

@Cary, thanks, I was starting to think that I was losing my mind, as I knew for a fact I had altered that CSS a bunch of times without the difficulty I'm having now. Any clue on exactly what part of the menu would be doing this? It's made with Allwebmenus program if that helps any. I'll look through the setup to see if anything looks like it would be what is causing that spacing, but I've no idea what it would be offhand lol.

@Eric, I believe I did try doing negative margins, but it moved everything else with it so I put it back. This makes more sense now though since it seems it's actually the menu causing it.

I'll look at the menu setup and see if anything stares back at me that is obvious and if not I'll let ya know that too. :)
User 205914 Photo


Ambassador
23 posts

to do what I am suggesting you need to know nothing about PHP.

Basically you would save the top part as the header.php.

The bottom would be the page name such as index.php

At the very top of each page you would add <?php include "header.php";?>

If you wanted to add a footer you could as well just save as footer.php anf add <?php include "footer.php";?> just above your </html> tag. This is the simple way of turrning your HTML and CSS pages into an PHP site. This also allows you only to update one page such as the header menu and it would be updated on all pages.

Its a great shortcut

Dave Stevens
FM Web Solutions | Lead Designer
fieldmedics4@gmail.com
www.fmwebsolutions.org
User 38401 Photo


Senior Advisor
10,951 posts

would this fix this spacing issue Dave?

I ask this because my menu is a java menu that is already setup to not have to update each page, it's a script I put on each page, but changes are all just made in the program and when I upload the new file changes it updates the menu then and there, no changes in any pages or CSS have to be done.

Having said that, your idea would definitely make my footer area easier to manipulate as I've had to manually do that quite a bit since I started all this.

I am really green with this though, and I've no idea what all goes in those files? Just the code from the particular areas of the html file? In other words, I just put the <?php include "footer.php";?> inside the footer container section of the page right? Same for the others also? Just put it inside their respective container areas? (I call them all container areas, they probably have a more technical name but they are basically containers to me lol).

Also, can this be done for just parts but not all of the site? Just wondering, I am pretty sure I was trying to use this footer stuff on my other site (my playground basically) and I was having a heck of a time getting it to line up right or something, can't recall exactly what problems I was having, but I did finally just give up on it lol.
User 205914 Photo


Ambassador
23 posts

It would. Just add how much space you want below the menu when you save the file as header.php.

Dave Stevens
FM Web Solutions | Lead Designer
fieldmedics4@gmail.com
www.fmwebsolutions.org
User 205914 Photo


Ambassador
23 posts

Yes just add you menu script to the header page.

Dave Stevens
FM Web Solutions | Lead Designer
fieldmedics4@gmail.com
www.fmwebsolutions.org
User 205914 Photo


Ambassador
23 posts

I can give you a break down of one of my sites..

www.fieldmedicsweb.com

This is my header page
http://www.fieldmedicsweb.com/header.php

My footer Page
http://www.fieldmedicsweb.com/footer.php

on each of my pages I add the code I gave you in post above for the script to to call for the header and footer.

Dave Stevens
FM Web Solutions | Lead Designer
fieldmedics4@gmail.com
www.fmwebsolutions.org

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.