THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN 310 In this code block, @ suppresses errors, so if it didn??™t work, you??™d receive no indication??” removing @ would show any errors. Also, the document root setting sets the include to take the HTML/document root instead of the server root as the starting point for looking for the included file (when the file path starts with a /), so be aware of that when defining paths. An alternative would be to use a relative path, such as include/document-name. php. This would work without pointing to the server at the document root (so long as the path was correct). Another more accessible option than using iframe elements is to use the object element to embed an external HTML document within a region of the page??”when combined with the scrolling div method shown in this section, it pretty much provides all the benefits of an iframe with very few of the drawbacks (the content is on the page, unlike with frames and iframes??”their content remains external). The following code block shows how an object element can be added to the page. Note the alternate content within the object element, displayed if the browser cannot show the object. This can be used to directly link to the file in the data attribute.
Like other elements, the object element can be styled using CSS, although Internet Explorer adds a border, so you need to overwrite existing border settings using conditional comments (see Chapter 9 for more on those) to prevent a double border.