NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Table and include trouble

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-15-2005, 06:52 AM THREAD STARTER               #1 (permalink)
Munky Designs
Join Date: May 2005
Posts: 996
Albino is a jewel in the roughAlbino is a jewel in the roughAlbino is a jewel in the rough
 



50NP$ for a bit of css help


Hey
????: NamePros.com http://www.namepros.com/programming/131928-table-and-include-trouble.html

ok, i have my site, its made up of a tables (please dont preach about css).
I have a cell on the left, which holds my menu bar, and then three cells on the right to hold my content box. Everything works fine, until i use the php include function to include my menu bar. I have no idea, why it happens, but my page goes all messed up, and I cant edit it, it says im:
" Making this change would require changing code that is locked by a template or a translator. The change will be discarded. "
Ive used php include many times, before, but ive never had this problem before.

Heres the code with the php include in :

Code:
<html>
<head>
<title>News</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<div align="center"><img src="table/Banner2.jpg" width="700" height="150"> </div>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td rowspan="4" width="190"><? include("BOMlinks.htm") ?></td>
    <td width="510" height="50"><img src="table/main_top.gif" width="510" height="50"></td>
  </tr>
  <tr> 
    <td background="table/main_mid.gif">&nbsp;</td>
  </tr>
  <tr> 
    <td height="50"><img src="table/main_bottom.gif" width="510" height="50"></td>
  </tr>
</table>
</body>
</html>
also, here is an image of it messed up within dreamweaver:


and heres how it looks when i preview it:



as you can see it looks kind of fine, but the menubar has a wierd 1 px padding round it, that isnt specified in the coding.

I hope someone can help!

Thanks
Last edited by Albino; 11-02-2005 at 02:42 AM.
Albino is offline  
Old 10-15-2005, 07:28 AM   #2 (permalink)
Domains my Dominion
 
sdsinc's Avatar
Join Date: Aug 2005
Location: Web 1.0
Posts: 9,558
sdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatness
 


Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV Animal Rescue Wildlife Breast Cancer Animal Rescue Wildlife
Don't know if it has anything to do but:
if I look at
HTML Code:
 <tr> 
    <td rowspan="4" width="190"><? include("BOMlinks.htm") ?></td>
    <td width="510" height="50"><img src="table/main_top.gif" width="510" height="50"></td>
  </tr>
Your table presumably has 2 columns but then we have:
HTML Code:
 <tr> 
    <td background="table/main_mid.gif">&nbsp;</td>
  </tr>
  <tr> 
    <td height="50"><img src="table/main_bottom.gif" width="510" height="50"></td>
  </tr>
where there seems to be one column only
????: NamePros.com http://www.namepros.com/showthread.php?t=131928
You should add a second column or use COLSPAN like this:
HTML Code:
 <tr> 
    <td colspan="2" background="table/main_mid.gif">&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="2" height="50"><img src="table/main_bottom.gif" width="510" height="50"></td>
  </tr>
Try to sanitize the table first. I don't know what is in the include file. Also check the output source on the browser side
sdsinc is online now  
Old 10-15-2005, 07:52 AM THREAD STARTER               #3 (permalink)
Munky Designs
Join Date: May 2005
Posts: 996
Albino is a jewel in the roughAlbino is a jewel in the roughAlbino is a jewel in the rough
 



im not sure what you mean

nothing is spanning two columns, and dreamweaver works with the top row first (so menu bar and top content image) then 2nd row and 3rd row (mid image and bottom image).

I can send my files if you want, or attatch them?
Albino is offline  
Old 10-17-2005, 02:15 PM THREAD STARTER               #4 (permalink)
Munky Designs
Join Date: May 2005
Posts: 996
Albino is a jewel in the roughAlbino is a jewel in the roughAlbino is a jewel in the rough
 



ok, got a bit of an extra problem.

If i put the full extension for the file, it works ok. BUT, there is a small border around the file it has included, which throws off my layout (admitedly only by 1px or so, but it annoys me). Any way i can get around this?

my page code is :

Code:
<html>
<head>
<title>News</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" style="text/css"
href="bomstyle.css" />
</head>

<body>
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td class="title" colspan="2"><p><img src="table/Banner2.jpg" width="700" height="150"></p>
      </td>
  </tr>
  <tr> 
    <td class="menu" rowspan="4"><? include("http://localhost/BOM/BOMlinks.htm") ?></td>
    <td class="contenttop"><img src="table/main_top.gif" width="510" height="50"></td>
  </tr>
  <tr>
    <td class="mid">&nbsp;</td>
  </tr>
  <tr>
    <td class="contentbottom"><img src="table/main_bottom.gif" width="510" height="50"></td>
  </tr>
</table>
</body>
</html>
my css code is :

Code:
body{
	/* background-color: #191B86 */
}
td.title{
	padding: 0px 0px 0px 0px;
	border-style: solid;
	border-width: 1px
}
td.menu{
	width: 190px;
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px 
}
td.contenttop{
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px; 
	width: 510px;
	height: 50px
}
td.mid{
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px;
	background-image: url('table/main_mid.gif')
}
td.contentbottom{
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px;
	height: 50px
}
thanks
????: NamePros.com http://www.namepros.com/showthread.php?t=131928

NP$ for who ever can help
Albino is offline  
Old 10-17-2005, 02:40 PM   #5 (permalink)
SQLdumpster.com
 
Encenta.com's Avatar
Join Date: Jun 2005
Location: West Sussex, UK
Posts: 573
Encenta.com has a spectacular aura aboutEncenta.com has a spectacular aura about
 




Try changing:

Code:
td.menu{
	width: 190px;
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px 
}
...to...

Code:
td.menu{
	width: 190px;
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px ;
        border-width: 0px;
}
__________________
Encenta - Amazon Associates CMS
Encenta.com is offline  
Old 10-17-2005, 03:06 PM THREAD STARTER               #6 (permalink)
Munky Designs
Join Date: May 2005
Posts: 996
Albino is a jewel in the roughAlbino is a jewel in the roughAlbino is a jewel in the rough
 



border was already defined in dreamweaver, but ive added it to the css, still no change

i can send files to people or attatch them if it helps.
Albino is offline  
Old 10-17-2005, 08:32 PM   #7 (permalink)
NamePros Regular
Join Date: Dec 2003
Posts: 207
treatist is an unknown quantity at this point
 



can you zip and post the current files? Before doing that however I would suggest you actually size the td.mid css.... I.E.

td.mid{
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
width: 510px; /* Add the width... */
background-image: url('table/main_mid.gif')
}


Hope that helps.
treatist is offline  
Old 10-18-2005, 09:03 AM THREAD STARTER               #8 (permalink)
Munky Designs
Join Date: May 2005
Posts: 996
Albino is a jewel in the roughAlbino is a jewel in the roughAlbino is a jewel in the rough
 



heres the attatched file, place in root directory and off you go
Attached Files
File Type: zip BOM.zip (295.5 KB, 1 views)
Albino is offline  
Old 10-19-2005, 08:15 AM   #9 (permalink)
NamePros Regular
Join Date: Dec 2003
Posts: 207
treatist is an unknown quantity at this point
 



The program you are using to slice your image is adding a Transparent/White spacer image. To see what I mean design a dark blue or black 1 pixel image and save it in place of your spacer.gif then view the page again. You should notice that the white border is now black.


Might want to redo your slicing so that it doesn't add that spacer image. Or did you add it? Hope that helps.
treatist is offline  
Old 10-23-2005, 02:37 PM THREAD STARTER               #10 (permalink)
Munky Designs
Join Date: May 2005
Posts: 996
Albino is a jewel in the roughAlbino is a jewel in the roughAlbino is a jewel in the rough
 



thanks man, ill look into it, sorry for the lack of replies.
Albino is offline  
Old 11-01-2005, 02:18 AM THREAD STARTER               #11 (permalink)
Munky Designs
Join Date: May 2005
Posts: 996
Albino is a jewel in the roughAlbino is a jewel in the roughAlbino is a jewel in the rough
 



right ok

50 NP$ for who ever can get the css to work in Ie as well as firefox

ive got too many things going on at the momet to worry about it

its prob only a 5 min job, and whoever does it, there may be more css jobs your way in the future
Albino is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Php include menu problems bigmac Web Design Discussion 4 03-25-2005 12:29 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 07:43 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger