Jump to content

Do php includes have a top margin?


Zohia

Recommended Posts

Hi!
I'm trying to put together a layout I made and am using php includes for the menu. The menu is in flash.
I have a column for the logo and the menu (which, as I said, is inside an include) and it's as if the include has a top margin:
http://www.os3porquinhos.com/racas.php

I put a border around the logo image and the flash menu so you could see the blue area on top of the menu.
Any ideas on how to eliminate this blue area?

Joana
Link to comment
Share on other sites

You need to revise your code.  The generated html for the page has two body openers, two heads, two doctypes and has code after the body closing tag, any or all of which will ruin the output.

It looks as though you have an include that has head and body tag openers and closers in it.  Think of "include" as being like copy/paste and obviously only needing to the content you want, not a complete stand-alone html file.
Link to comment
Share on other sites

Yes, the idea behind include is.
If you have an include like
<?php
include './includes/general.inc.php';
?>
Inside it says.
<h3>Hello</h3>
<p>Hello how are you today.</p>
Then you include that into a page like this

<html>
<head>
<title>Hi</title>
</head>
<body>
<?php
include './includes/general.inc.php';
?>
</body>
</html>

If you go to the browser, and look at hte source you see

[code]<html>
<head>
<title>Hi</title>
</head>
<body>
<h3>Hello</h3>
<p>Hello how are you today.</p>
</body>
</html>
[/code]
See it simply cut's it into the text.
Include is the same thing for every language roughly.
It is just a way to insert text from another page.
That is the general idea.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.