• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

GoLive Basics > Aligning Foreground with Background

Aligning Foreground with Background

When you use backgrounds in a design, you may discover that it’s difficult to align objects in the HTML page with the background. This problem is caused by the browser offset, which unfortunately is not only different for Navigator and Explorer but also varies for different computer platforms. Browser offset is the distance that content is placed from the upper-left corner of the browser window. In the early days of HTML and the Web, it made sense for the browser to display the content with an offset so that it wouldn’t crash into the upper-right corner of the window. But when the background image function was introduced to HTML, this browser offset became problematic: Since the background is positioned without an offset, you can’t be exactly sure how a foreground graphic element will align with the background. Back in the “old” days (with the 3.0 browsers) Web designers had to use JavaScript to detect which browser the visitor was using and then compensate for the offset by loading different background images. Luckily this isn’t necessary anymore. Netscape and Microsoft fixed this problem, and all 4.x or later browsers let you set the offset by including some additional attributes in the BODY tag. However, since this was an extension to the official HTML specification, each company used different attributes, so to set the offset to zero for both browsers, you have to use a combination of these attributes in the BODY tag: <BODY leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">.

In GoLive you don’t have to manually type in these attributes. All you need to do is to click on the Page icon in the upper-left corner of your document and set Margin Width and Height to 0 in the Page Inspector.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint