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

Pattern Group I. Designing Effective Pag... > Mix Absolute and Relative Widths to ...

Mix Absolute and Relative Widths to Fix the Width of Some Parts of a Web Page

You can make specific columns within a table fixed width or relative width. Many Web site designs take advantage of this feature by making the navigation and side content on the left and right sides fixed, while letting the center content expand. Here's an example of how to do this in HTML:

<HTML> 
<BODY>

<!— this makes the entire table expanding width —>
<TABLE WIDTH=100% BORDER=1>
   <TR>
      <!— the left column is fixed at 170 pixels —>
      <TD WIDTH=170>
         Fixed width left
      </TD>

      <!— the browser puts any leftover space here —>
      <!— making this column expand to fill up space —>
      <TD>
         Expanding-width content goes over here. This
         sentence is extra long just to underscore this
         point.
      </TD>

      <!— the right column is fixed at 170 pixels —>
      <TD WIDTH=170>
         Fixed width right
      </TD>
   </TR>
</TABLE>

</BODY>
</HTML>


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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