Jump to content


Photo

Do php includes have a top margin?


  • Please log in to reply
4 replies to this topic

#1 Zohia

Zohia
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 16 October 2006 - 07:25 PM

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

#2 aebstract

aebstract
  • Members
  • PipPipPip
  • Advanced Member
  • 1,105 posts

Posted 17 October 2006 - 02:24 AM

I dont see a space? O.o

There is an area of the mind that could be called unsane, beyond sanity, and yet
not insane. Think of a circle with a fine split in it. At one end there's
insanity. You go around the circle to sanity, and on the other end of the
circle, close to insanity, but not insanity, is unsanity.


#3 Zohia

Zohia
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 17 October 2006 - 08:22 AM

Sorry! :-[
I was now making experiments in a new page to avoid changing that one but as I was using the same menu I accidentally removed it's border.
You can see it now and check the space.

Joana

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 17 October 2006 - 11:21 AM

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.
Legend has it that reading the manual never killed anyone.
My site

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 17 October 2006 - 06:29 PM

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

<html>
<head>
<title>Hi</title>
</head>
<body>
<h3>Hello</h3>
<p>Hello how are you today.</p>
</body>
</html>
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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users