HTML - Include File, Works Fine In Preview But Not In Browser
Similar TutorialsSo I created an html file in text edit and when I try to preview it in Safari or Firefox, they both just show the html code. This is the code, simple right? <html> <body> <h1> Carly Krysak</h1> <p>Marketing Director</p> <h2>Frank's Auto Supermarket</h2> <p>P: 724.430.2000</p> <p>F: 724.438.5990</p> <a href="http://tiny.cc/FbWeSpeakCar">Facebook</a> <a href="www.autosupermarket.com">Website</a> <a href="www.GrindingGearsBlog.com">Blog</a> </body> </html> As long as it's saved as an html file and being opened in a browser it should show right? Help please. Hi All, im new here so go easy. this might be an easy answer. i am making this website and am positioning items around the site using div tags. the site looks just how i want it to in Firefox but when i open it in IE it has different sizes everywhere and does not match up. also i have a logo in the upper right of the site. how do i get this to resize when the browser size is changed? here is the sites code. <html> <head> <title>Maroondah Trailers</title> </head> <body BGCOLOR="807a7a"> <div style="background-image:url('pictures/bg.gif'); background-repeat: repeat; position: absolute; left: 0%; top: 0%; width: 16%; height: 97%;"></div> <div style="background-image:url('pictures/bg.gif'); background-repeat: repeat; position: absolute; left: 84%; top: 0px; width: 16%; height: 97%;"></div> <div style="background-color: White; position: absolute; left: 16%; top: 15%; width: 68%; height: 82%;"></div> <div style="background-color: ff3600; color: white; position: absolute; left: 16%; top: 15%; width: 68%; height: 4%;"></div> <div style="position: absolute; left: 60%; top: 3%; width: 30%; height: 40%;"><img src="pictures\logo2.gif"></div> <div style="background-color: black; position: absolute; left: 84%; top: 0%; width: .2%; height: 97%;"></div> <div style="background-color: black; position: absolute; left: 16%; top: 0%; width: .2%; height: 97%;"></div> <div style="background-color: black; position: absolute; left: 0%; top: 97%; width: 100%; height: .2%;"></div> <div style="background-color: black; position: absolute; left: 0%; top: 97%; width: 100%; height: .2%;"></div> <div style="background-color: black; position: absolute; left: 16%; top: 15%; width: 68%; height: .2%;"></div> <div style="background-color: black; position: absolute; left: 16%; top: 19%; width: 68%; height: .3%;"></div> </body> </html> heres what they both look like thanks alot Matt See http://www.smoli.com I just added the SmoothDivScroll (jQuery add-on) to my page to create scrolling images at the bottom. Unfortunately as a result the table no longer resized correctly to the size of the screen, and the scrolling does not work. This only happens in Firefox, in IE8 everything works as it should. Any idea what is wrong with my code? Many thanks in advance, J. PS: Everything also works fine when previewed from within FrontPage 2k3 (the editor I use to create the page). So my site that i am developing has hit a bit of a snag. In firefox it looks great, however when i switch over to IE i get a big white space. I am wondering if anyone knows how i can correct this white space? http://www.wdwcanada.com/maps.php is the link. Thanks, Hi, Thanks in advance for your help. I'm doing a web page that I would like to be viewed on 1024 resolutions without a horizontal scrollbar. It will contain images that are exactly 980px wide. The problem is that with ie7, as soon as it contains a div or a table, no matter what I do to try to remove all padding,margins,etc.. it adds 2px for each element (I guess 1px for each side). Below is some html as an example of my problem, where I've tried to remove everything I can think of... this works fine in firefox 3 <body style="width:998px;margin-top:0;margin-left:0;margin-right:0;padding:0;"> <div style="width:100%;textalign:center"><table border="0" cellspacing="0" cellpadding="0" style="width:998px;border-collapse:collapse;padding:0;margin:0;border:0;"><tr style="padding:0;margin:0;border:0;"><td style="padding:0;margin:0;border:0;">sdfsdfd</tr></td></table><div style="width:100%> </body> my problem is ie and its padding, ie has add a 4px padding at the bottom of the of the image but in safari and firefox there is no padding. here is the url so u understand what i mean http://nathanoconnor.co.uk/gilbertelectrical/site/ Hi I have tried a lot of things and search the internet for hours regarding this matter... My image background doesn't reapeat in Internet explorer however works fine in any other browsers such as google chrome and firefox. Can you please help me get this fixed? I am new to xhtml and css and really it's really frustrating having this kind of problem. Thank you Website Link: www.pjrazon.co.uk/newlayout/index.html screenshots if it helps: CSS: @charset "utf-8"; * { margin: 0px; padding: 0px; } body { background-color: #CCCCCC; } a:link { color: #ffffff; text-decoration: none; } a:visited {text-decoration: none;} a:hover {color: #b23937;} a:active {text-decoration: none;} #wrapper { width: 1151px; margin-right: auto; margin-left: auto; border-right-width: thin; border-left-width: thin; border-right-style: solid; border-left-style: solid; border-right-color: #999999; border-left-color: #999999; } #wrapper #logo { height: 120px; width: 1151px; } #wrapper #navigation { background-image: url(../images/nav.home.gif); height: 32px; } #wrapper #navigation #navlabel { color: #FFFFFF; padding-top: 5px; padding-left: 125px; } #wrapper #navigation #navlabel #nav li { display:block; width:100px; float:left; list-style:none; } #wrapper #header { height: 391px; background-image: url(../images/welcome.jpg); } #wrapper #mainContent { height: 384px; background-image: url(../images/maincontent.jpg); width: 1151px; } #wrapper #bodyArea #footer { background-image: url(../images/footer.jpg); height: 73px; clear: both; } #wrapper #bodyArea { background: url(../images/bg_bodyarea.jpg) repeat-y; } #wrapper #bodyArea #mainContent #content { display:block; width:400px; float:left; } #wrapper #bodyArea #mainContent #contentwrapper { padding-left: 140px; padding-top: 70px; } HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Perfect Vision</title> <link href="css/layout.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div id="logo"><img src="images/header.jpg" alt="logo" /></div> <div id="navigation"> <div id="navlabel"> <ul id="nav"> <li><a href="homepage.html">Home</a></li> <li><a href="profile.html">Profile</a></li> <li><a href="portfolio.html">Portfolio</a></li> <li><a href="contact.html">Contact</a></li> </ul> </div> </div> <div id="header"></div> <div id="bodyArea"> <div id="mainContent"> <div id="contentwrapper"> <div id="content"> <p>August 10 2010</p> <p> </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam semper turpis in tortor interdum sed mattis lectus mollis. Pellentesque laoreet quam et mauris feugiat sit amet eleifend turpis imperdiet. Praesent condimentum libero vitae massa imperdiet pellentesque. Vestibulum et risus dolor, ac tincidunt velit. Maecenas lobortis diam tellus. Suspendisse auctor, velit ut imperdiet semper, erat orci pharetra tortor, venenatis vulputate metus eros ut felis. Cras ullamcorper odio sed felis ornare ultricies. Phasellus porta adipiscing aliquet. Aenean ligula tellus, blandit a pulvinar in, fermentum a erat. Sed arcu nisl, porta eu vestibulum at, luctus sed tellus. Aenean eget quam justo, quis ultricies ante. Vivamus tempor sollicitudin augue ut rhoncus. Sed odio mauris, imperdiet ut elementum vitae, dapibus at quam. Nullam in aliquam sem. Fusce consectetur laoreet elit, non consequat nunc tempus nec. Cras at enim ipsum. Praesent ipsum purus, tempus non sagittis volutpat, fringilla eget mi. Maecenas sed elit est. Morbi facilisis purus eget nunc tincidunt iaculis mattis quam pellentesque. </p> <p> Sed tortor leo, laoreet sit amet mattis a, fermentum in ligula. Sed tempor lacus a lorem fermentum fermentum semper nunc sagittis. Vivamus et est porta purus mollis cursus eget in ante. Sed lacinia, diam in tempor suscipit, turpis enim posuere turpis, sit amet vestibulum quam nulla id elit. Vivamus ultricies tempus mi, non consequat velit mollis id. Curabitur vehicula, turpis id tempor condimentum, sem nulla molestie enim, vel commodo metus ipsum non nisi. Aliquam erat volutpat. Fusce venenatis porttitor massa eget suscipit. Sed purus turpis, iaculis id sollicitudin id, vulputate sit amet velit. Suspendisse sed velit non tellus eleifend venenatis vehicula ut elit. Integer sit amet ullamcorper nulla. </p> <p> Vestibulum dictum ante eu nisl ornare tincidunt. Etiam id risus mauris. Duis nec turpis in neque porttitor euismod sed id odio. Sed molestie urna a magna fermentum egestas. Nulla facilisi. Quisque risus neque, sodales pulvinar rhoncus a, lacinia eget neque. Vivamus vel malesuada nisl. Proin mollis tempor felis id dapibus. Morbi velit mi, aliquet sed malesuada et, blandit vitae eros. Nulla nec lorem quam, eu aliquam sapien. Quisque venenatis, enim non ultricies lobortis, lectus dolor consectetur nulla, eu tincidunt metus enim vitae libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent sit amet neque eu libero commodo condimentum. Fusce hendrerit diam sed libero lacinia nec adipiscing massa posuere. Pellentesque eget libero risus, eget venenatis metus. Morbi quis dolor enim. Cras orci orci, ultrices nec consectetur sed, auctor non leo. Aliquam nec sem erat. Nam ut nunc sed leo tempor pretium. Maecenas sit amet tortor a neque congue iaculis eu in ipsum. </p> </div> </div> </div> <div id="footer"></div> </div> </div> </body> </html> http://www.yandina.com/JIndex.htm Open in Firefox, Chrome or Safari - - - that is what it is supposed to look like. Open in IE and the last table get overlaid on top of the previous table. What sort of things can cause that? Additional (unrelated I think) problem, IE is not accessing cookies but others are fine. What can cause that? Hello folks. I have been trying out this site as a beta for a hockey team. I am developing a site and have an issue with ONE page in particular. Every other page looks great! http://web.mac.com/chris.ducasse/force_beta/staff.html That is the culprit. I have looked over the source code, and cannot find anything that would cause it. What happens, if you don't see it, is that the page does not take the entire site width, it wraps the text at about 2 inches or so away from the right edge of the page. Any help is appreciated. Also, I got the navigation bar (modified it myself) from Open Source Web Design and want to give the artist credit - where do I do that in HTML code? Thanks again. I'm a newbie and I need help with using the #include directive. below is a sample file usinging the #include directive: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <!-- #include file="test.html" --> </body> </html> Here is the contents of test.html: <h1>header</h1> When I display the test.html in my brower the text show up. When I run the main file above with the include statement the contents of the test file will not appear. I've tried using #include virtual and I get the same results. both files reside in the same directory. How can I get the above files to work. I'm working with windows XP on a home computer. This problem occured in my actual website files becasue I want to include a header and a footer. These files of course have table tags etc in them and I get the same results where the include files contents do appear. I need help asap if that is possible. Hello Please could you help me with the following issue. I paid a freelancer to design my website. The website works perfectly on her computer however it does not seem to work on mine or infact anybody elses. I have checked many different browsers but the website on my screen is completly out of place ( Checked Firefox 7, IE6 + 8). Also on IE it does not read the css file What could be wrong. Please visit http://qcssoft.com/demo/Planet_perfume/ and view source for the code. Also could you let me know if the top navigation and left navigation along with the main area on IE & Firefox are out of place Thanks foryou help. Much appericated Trying to use this function i used the one it gives you in dreamweaver but it never seems to work. It will show in the preview on dreamweaver but when i run the .html file the content of the file that was included does not show. Here is what i used... Code: <!--#include file="PGS/DWNLDS.html" --> Any ideas of what i can do to get this to work? Thanks. Dear Members: I have a funny problem. I have two html files. I am trying to use test2.html as an Include file inside test1.html. I am not having any luck test1.html file reading test2.html. Test1.html code --------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> Your Title Here </title> <meta name="Generator" content="Alleycode HTML Editor"> <meta name="Description" content="Your description here..."> <meta name="Keywords" content="Your keywords here..."> </head> <body> <h1>This is my n include 1</h1> <h2>This is my n include 2</h2> <!--#include virtual="test2.html"--> </body> </html> test2.html code <h1>This is my include 3</h1> <h2>This is my include 4</h2> What I expect to see in the browser: This is my include 1 This is my include 2 This is my include 3 This is my include 4 But I see only This is my include 1 This is my include 2 It seems like the test2.html file is completely being ignored. May be it is a simple issue. But I tried everything. Both files reside on the same directory. If anybody could give me a suggestion, I shall truly appreciate it. As they say "It is driving me nuts"... Please help. I am trying to include a file on Onclick event on a button. But the code returns errors. Pls suggest. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script type="text/javascript"> function includefile() { <%@ include file="somefile.jsp" %>; } </script> </head> <body> <table> <tr> <td><input type="button" value="Click Here" onclick="includefile()"/></td> </tr> </table> </body> </html> Greetings I don't understand php at all and i have page in HTML. Now i have this guestbook script that i would really much like to add to the html page, so what now? My apache server can handle php and everything in the server end is right, but when i put this in to my html page: include($path."comment.php"); Nothing happens, now i suspect that i need to turn the whole page in to PHP. However i don't know how to do this, could anyone tell me how do i turn this page to PHP and get it to work? What is the code i need to put in to my html page? Please help this is important to me, thank you inadvance! Turhamuro Hi guys, I have a div on my page, which essentially just places a layer/table over the entire page and displays a "LOADING..." message, then promptly disappears when everything hidden beneath it has finished loading. I want to use this same div in several other pages, so I thought the best way would be to place it in an external file, then simply call it when required. Can someone please tell me how I can do this, i.e. what code I need to place in my HTML script to call an external div? I apologise if this is an obvious newbie-style question! But I appreciate any help that anyone out there can give me. Thanks in advance, Kate. If you want to include a template file how do you do that inside a html page? I want to include a footer.dwt file inside my html file...... I want to implement the footer.dwt file for all the pages of website....so i just want to call the footer.dwt file below my html page...... Help? I've been customising templates on a CMS over time, mainly using a Mac for the editing side of things, but then checking on a PC with different browsers, of course. I carried out a few changes a while back and things looked fine in Safari, but not so fine when I checked them on IE7. An example: http://www.ukprwire.com/Detailed/Con...uk_11538.shtml Anyone know why the page is extra wiiiiide in IE, but fine in Safari? I've since checked it with Firefox and its fine with that one too. Hi, I have been using ext its really fun working on it. Question:-- How can I upload a (*.jpg,*.bmp etc) file from browser to java webserver and store the file in some temporary folder(so that form webserver I could upload the file to my application server). Ur repsonse can help me analyze the problem and its possible solutions. Thanks Hi, I'm trying to include one HTML file in another. I tried iframe and was displeased with the results, I want the size of the frame to change dynamically and not just scroll. Fair warning, my knowledge of JavaScript is non-existent >_> . Basically, I have a document written in HTML (please don't suggest a wholesale re-write, that's simply not practical) and the idea is to have one file where it makes sense to include it several times. One thing to mention, this document is not meant to be shown on a web-server, but in a browser while you're reading it off your hard-drive. Here's what I have so far. main.shtml Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>test</title> </head> <body> <center> <h1> This is only a test! </h1> </center> <p> Still testing!!!!! </p> <!-- #include file="included.html" --> <p> Even more testing!!!!! </p> </body> </html> included.html Code: <!--<html> <head> <title> asdfasdfasdfasd </title> </head> <body>--> <p> <h4> foobar </h4> <br> <br> <br> <br> <h4> boofar </h4> </p> <!--</body> </html>--> Not sure what I'm doing wrong, help appreciated! |