| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Munky Designs Join Date: May 2005
Posts: 996
![]() ![]() ![]() | 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"> </td>
</tr>
<tr>
<td height="50"><img src="table/main_bottom.gif" width="510" height="50"></td>
</tr>
</table>
</body>
</html> ![]() 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
__________________ Toddish.co.uk - Portfolio/Blog Powcomics.com - Webcomic Hosting/Directory Erant.co.uk - vent your rage!
Last edited by Albino; 11-02-2005 at 02:42 AM.
|
| |
| | #2 (permalink) |
| Domains my Dominion Join Date: Aug 2005 Location: Web 1.0
Posts: 9,558
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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> HTML Code: <tr> <td background="table/main_mid.gif"> </td> </tr> <tr> <td height="50"><img src="table/main_bottom.gif" width="510" height="50"></td> </tr> ????: 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"> </td> </tr> <tr> <td colspan="2" height="50"><img src="table/main_bottom.gif" width="510" height="50"></td> </tr> |
| |
| | THREAD STARTER #3 (permalink) |
| Munky Designs Join Date: May 2005
Posts: 996
![]() ![]() ![]() | 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? |
| |
| | THREAD STARTER #4 (permalink) |
| Munky Designs Join Date: May 2005
Posts: 996
![]() ![]() ![]() | 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"> </td>
</tr>
<tr>
<td class="contentbottom"><img src="table/main_bottom.gif" width="510" height="50"></td>
</tr>
</table>
</body>
</html> 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
} ![]() ????: NamePros.com http://www.namepros.com/showthread.php?t=131928 NP$ for who ever can help |
| |
| | #5 (permalink) |
| SQLdumpster.com Join Date: Jun 2005 Location: West Sussex, UK
Posts: 573
![]() ![]() | Try changing: Code: td.menu{
width: 190px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px
} Code: td.menu{
width: 190px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px ;
border-width: 0px;
}
__________________ Encenta - Amazon Associates CMS |
| |
| | #7 (permalink) |
| NamePros Regular Join Date: Dec 2003
Posts: 207
![]() | 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. |
| |
| | #9 (permalink) |
| NamePros Regular Join Date: Dec 2003
Posts: 207
![]() | 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. |
| |
| | THREAD STARTER #11 (permalink) |
| Munky Designs Join Date: May 2005
Posts: 996
![]() ![]() ![]() | 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 |
| |
![]() |
| 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 |