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

Hour 16. Using Style Sheets > Positioning and Layers

Positioning and Layers

Here's the bad news: Neither the official HTML 4 standard nor the official cascading style sheets, level 1 (CSS1) standard gives you any direct way to control the exact position of the images and text on your Web pages. The closest thing you can do is adjust the margins of your page. For example, the following HTML would position the first image on the page exactly 50 pixels to the left and 40 pixels down from the top-left corner of the browser window. It would then indent the text exactly 60 pixels from the left edge of the browser window.

<body>
<span style="margin-left: 50px; margin-top: 40px">
<img src="pretty.gif" /></span>
<span style="margin-left: 60px;">
This is a pretty picture.</span>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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