How to stretch content div to bottom of page.

Been messing around with my site so much that I needed to create a new one.
However, I can't get to stretch the content div to the bottom of the page if the content text doesn't fill the page.
I have a footer at the bottom of the page that stretches the full width of the page, so I can't use the trick with the body background.
I found a lot of results on the internet, but I seem to get a little lost.
Can anyone help me?
This is my HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Schudden fansite</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<link href="../css/Noorderzon.css" rel="stylesheet" type="text/css" /></head>
<body class="oneColElsCtrHdr">
<div id="container">
<div id="header">
<h1> </h1>
<!-- end #header --></div>
<div id="mainContent">
<div id="nav"><a href="#" title="Home">Home</a> | <a href="#" title="Biography">Biography</a> | <a href="#" title="News &amp; Updates">News &amp; Updates</a> | <a href="#" title="Gallery">Gallery</a> | <a href="#" title="Portfolio Work">Portfolio Work</a> | <a href="#" title="Links">Links</a> | <a href="#" title="Contact">Contact</a></div>
<p>Main Content</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. P</p>
    <h2> </h2>
    <p> </p>
</div>
  <div id="footer">
    <p> </p>
  <!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
And this is the CSS code:
@charset "utf-8";
body {
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9pt;
background-color: #800000;
margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
height: 100%;
body,td,th {
font-size: 9pt;
color: #333;
/* Tips for Elastic layouts
1. Since the elastic layouts overall sizing is based on the user's default fonts size, they are more unpredictable. Used correctly, they are also more accessible for those that need larger fonts size since the line length remains proportionate.
2. Sizing of divs in this layout are based on the 100% font size in the body element. If you decrease the text size overall by using a font-size: 80% on the body element or the #container, remember that the entire layout will downsize proportionately. You may want to increase the widths of the various divs to compensate for this.
3. If font sizing is changed in differing amounts on each div instead of on the overall design (ie: #sidebar1 is given a 70% font size and #mainContent is given an 85% font size), this will proportionately change each of the divs overall size. You may want to adjust based on your final font sizing.
#container  {
width: 100%;
text-align: center; /* this overrides the text-align: center on the body element. */
margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
background-color: #800000;
padding-bottom: 0px;
top: 0px;
bottom: 0px;
height: 100%;
#header  {
width: 960px;
padding-top: 0;
padding-bottom: 0;
height: 160px;
margin-right: auto;
margin-left: auto;
background-color: #DDDDDD;
background-image: url(../images/header.jpg);
#header h1  {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
#mainContent  {
width: 960px;
margin-right: auto;
margin-left: auto;
padding-top: 0;
padding-right: 0px;
padding-bottom: 0;
padding-left: 0px;
background-image: url(../images/mainbg.jpg);
height: 100%;
#nav {
text-align:center;
margin-top:0px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10pt;
color:#000;
font-weight:700;
padding-top:9px;
padding-bottom:10px;
text-decoration:none;
background-image: url(../images/mainbg.jpg);
background-repeat: repeat;
width: 960px;
#nav a {
background:#fff;
color:#000;
text-decoration:none;
#nav a:active {
background:#fff;
color:#800000;
#nav a:hover {
background:#fff;
color:#000;
font-size:10pt;
padding-bottom:2px;
border-bottom-width: 3px;
border-bottom-style: dotted;
border-bottom-color: #800000;
a:link {
color: #000;
a:hover {
color: #800000;
a:active {
color: #369;
a:visited {
color: #369;
#footer  {
height: 100px;
width: 100%;
padding-top: 0;
padding-bottom: 0;
background-image: url(../images/bottom.png);
margin-bottom: 0px;
bottom: 0px;
position: fixed;

so Im having an issue that is similar but the fixes arent really working. Here is the site http://upeer.jordanselectronics.com/
I've never worked with a page this short so it was never an issue but I want the content area to stretch 100 percent so it fills the browser window and pushes the footer to the bottom if the page is so short theres no scroll bar. I put height modifiers on the body, the wrapper(container) and the content div but it's still only as tall as the content in the content div.
@charset "utf-8";
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
min-height: 100%;
/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
h1, h2, h3, h4, h5, h6, p {
font-family: Arial, Helvetica, sans-serif;
color: #333;
font-size: 1em;
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color: #42413C;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
a:visited {
color: #6E6C64;
text-decoration: underline;
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
/* ~~ this fixed width container surrounds the other divs ~~ */
.container {
width: 960px;
margin: 0 auto;
height: 100%;
/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
.header {
/* ~~ This is the layout information. ~~
1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
.content {
background-image: url(contentbackground.png);
padding: 25px;
min-height: 100%;
/* ~~ The footer ~~ */
.footer {
background-image: url(footerbackground.png);
background-repeat: no-repeat;
/* ~~ miscellaneous float/clear classes ~~ */
.fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
.navbar {
background-color: #F00;

Similar Messages

  • How  to  save  content of a  whole  swing  page

    Hi everyone ..
    can any of u tell me ,how to save contents of a java swing page in a single file with all components viz . textfield,textarea,JTable,JPanel etc .. with their respective formatting ie.e Font,Color etc ..
    Plz let me know it soon .. its very urgent ..
    Can I save it as Screenshot or Jpeg Image .. or how to go about it .
    Mohit

    Sure: see below!
    WARNING: this code will not compile as is because it uses some other classes from my personal code library (FileUtil & StringUtil). The particular methods of those classes which are used below are trivial methods that anyone can write, which is is why I have not posted them as well. So, to get the code below to compile, you can
    a) write your own versions of these classes or
    b) simply add the necessary methods to this class or
    c) simply comment out their usage (in the case of StringUtil, which is just used for arg checking)
    But if you still want me to post them, then I can post the relevant fragments of those classes.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import javax.imageio.*;
    import javax.swing.*;
    import bb.io.FileUtil;
    import bb.util.StringUtil;
    * Class which supports taking screen shots of the entire desktop, AWT Components, or Swing JComponents.
    * This functionality is implemented in a series of <code>take</code> methods, each of which returns a BufferedImage.
    * This class also offers convenience <code>write</code> methods for storing BufferedImages to files.
    * <p>
    * The images taken by this class should be the precise images seen on the screen.
    * <b>However, the images written to files may deviate from the originals.</b>
    * One obvious cause is limitations of the chosen file format (especially with lossy formats like jpeg).
    * A subtle issue can occur, however, even when using lossless formats like png:
    * if the file is subsequently opened by another application,
    * that application may rescale the image, which can often cause visible artifacts.
    * <blockquote>
    *     To see this last problem on Windows XP,
    *     call {@link #take()} which returns an image of the entire desktop and write it to a file,
    *     and then open the file with XP's default graphics file viewer ("Windows Picture And Fax Viewer").
    *     This program shrinks the desktop image in order to fit it inside the program's window,
    *     and rescaling artifacts are readily seen, especially if the desktop image has any kind of text in it.
    *     If "Windows Picture And Fax Viewer" instead cropped the image or had a scroll pane, then this should not happen.
    * </blockquote>
    * <p>
    * Acknowledgement: this class was inspired by the program
    * <a href="http://www.discoverteenergy.com/files/ScreenImage.java">ScreenImage</a>.
    * Differences from the above program:
    * <ol>
    *  <li>this class uses {@link BufferedImage#TYPE_INT_ARGB} instead of {@link BufferedImage#TYPE_INT_RGB} in order to preserve alpha</li>
    *  <li>this class's {@link #formatNameDefault default image file format} is PNG instead of JPEG</li>
    *  <li>this class's <code>take</code> methods simply take snapshots and never have the side effect of writing image files</li>
    *  <li>this class added a version of <code>take</code> which can get a snapshot of a region of a Component</li>
    *  <li>
    *          when taking a snapshot of a region of a Component or JComponent,
    *          the Rectangle that specifies the region always has coordinates relative to the origin of the item
    *  </li>
    * </ol>
    * See also:
    * <a href="http://forum.java.sun.com/thread.jspa?forumID=57&threadID=597936">forum discussion #1 on screen shots</a>
    * <a href="http://forum.java.sun.com/thread.jspa?forumID=256&threadID=529933">forum discussion #2 on screen shots</a>
    * <a href="http://forum.java.sun.com/thread.jspa?forumID=57&threadID=622393">forum discussion #3 on screen shots</a>.
    * <p>
    * It might appear that this class is multithread safe
    * because it is immutable (both its immediate state, as well as the deep state of its fields).
    * However, typical Java gui code is not multithread safe, in particular, once a component has been realized
    * it should only be accessed by the event dispatch thread
    * (see <a href="http://java.sun.com/developer/JDCTechTips/2003/tt1208.html#1">Multithreading In Swing</a>
    * and <a href="http://java.sun.com/developer/JDCTechTips/2004/tt0611.html#1">More Multithreading In Swing</a>).
    * So, in order to enforce that requirement, all methods of this class which deal with components
    * require the calling thread to be the event dispatch thread.
    * See the javadocs of each method for its thread requirements.
    * <p>
    * @author bbatman
    public class ScreenShot {
         // -------------------- constants --------------------
         * Defines the image type for the BufferedImages that will create when taking snapshots.
         * The current value is {@link BufferedImage#TYPE_INT_ARGB}, which was chosen because
         * <ol>
         *  <li>the 'A' in its name means that it preserves any alpha in the image (cannot use the "non-A" types)</li>
         *  <li>the "_INT" types are the fastest types (the "BYTE" types are slower)
         * </ol>
         * @see <a href="http://forum.java.sun.com/thread.jspa?threadID=709109&tstart=0">this forum posting</a>
         private static final int imageType = BufferedImage.TYPE_INT_ARGB;
         * Default value for the graphics file format that will be written by this class.
         * The current value is "png" because the PNG format is by far the best lossless format currently available.
         * Furthermore, java cannot write to GIF anyways (only read).
         * <p>
         * @see <a href="http://www.w3.org/TR/PNG/">Portable Network Graphics (PNG) Specification (Second Edition)</a>
         * @see <a href="http://www.w3.org/QA/Tips/png-gif">GIF or PNG</a>
         * @see <a href="http://www.libpng.org/pub/png/">PNG Home Site</a>
         public static final String formatNameDefault = "png";
         // -------------------- take --------------------
         // desktop versions:
         * Takes a screen shot of the entire desktop.
         * <p>
         * Any thread may call this method.
         * <p>
         * @return a BufferedImage representing the entire screen
         * @throws AWTException if the platform configuration does not allow low-level input control. This exception is always thrown when GraphicsEnvironment.isHeadless() returns true
         * @throws SecurityException if createRobot permission is not granted
         public static BufferedImage take() throws AWTException, SecurityException {
              Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
              Rectangle region = new Rectangle(0, 0, d.width, d.height);
              return take(region);
         * Takes a screen shot of the specified region of the desktop.
         * <p>
         * Any thread may call this method.
         * <p>
         * @param region the Rectangle within the screen that will be captured
         * @return a BufferedImage representing the specified region within the screen
         * @throws IllegalArgumentException if region == null; region's width and height are not greater than zero
         * @throws AWTException if the platform configuration does not allow low-level input control. This exception is always thrown when GraphicsEnvironment.isHeadless() returns true
         * @throws SecurityException if createRobot permission is not granted
         public static BufferedImage take(Rectangle region) throws IllegalArgumentException, AWTException, SecurityException {
              if (region == null) throw new IllegalArgumentException("region == null");
              return new Robot().createScreenCapture( region );     // altho not currently mentioned in its javadocs, if you look at its source code, the Robot class is synchronized so it must be multithread safe, which is why any thread should be able to call this method
         // AWT Component versions:
         * Takes a screen shot of that part of the desktop whose area is where component lies.
         * Any other gui elements in this area, including ones which may lie on top of component,
         * will be included, since the result always reflects the current desktop view.
         * <p>
         * Only {@link EventQueue}'s {@link EventQueue#isDispatchThread dispatch thread} may call this method.
         * <p>
         * @param component AWT Component to take a screen shot of
         * @return a BufferedImage representing component
         * @throws IllegalArgumentException if component == null; component's width and height are not greater than zero
         * @throws IllegalStateException if calling thread is not EventQueue's dispatch thread
         * @throws AWTException if the platform configuration does not allow low-level input control. This exception is always thrown when GraphicsEnvironment.isHeadless() returns true
         * @throws SecurityException if createRobot permission is not granted
         public static BufferedImage take(Component component) throws IllegalArgumentException, IllegalStateException, AWTException, SecurityException {
              if (component == null) throw new IllegalArgumentException("component == null");
              if (!EventQueue.isDispatchThread()) throw new IllegalStateException("calling thread (" + Thread.currentThread().toString() + ") is not EventQueue's dispatch thread");
              Rectangle region = component.getBounds();
              region.x = 0;     // CRITICAL: this and the next line are what make region relative to component
              region.y = 0;
              return take(component, region);
         * Takes a screen shot of that part of the desktop whose area is the region relative to where component lies.
         * Any other gui elements in this area, including ones which may lie on top of component,
         * will be included, since the result always reflects the current desktop view.
         * <p>
         * Only {@link EventQueue}'s {@link EventQueue#isDispatchThread dispatch thread} may call this method.
         * <p>
         * @param component AWT Component to take a screen shot of
         * @param region the Rectangle <i>relative to</i> component that will be captured
         * @return a BufferedImage representing component
         * @throws IllegalArgumentException if component == null; component's width and height are not greater than zero; region == null
         * @throws IllegalStateException if calling thread is not EventQueue's dispatch thread
         * @throws AWTException if the platform configuration does not allow low-level input control. This exception is always thrown when GraphicsEnvironment.isHeadless() returns true
         * @throws SecurityException if createRobot permission is not granted
         public static BufferedImage take(Component component, Rectangle region) throws IllegalArgumentException, IllegalStateException, AWTException, SecurityException {
              if (component == null) throw new IllegalArgumentException("component == null");
              if (region == null) throw new IllegalArgumentException("region == null");
              if (!EventQueue.isDispatchThread()) throw new IllegalStateException("calling thread (" + Thread.currentThread().toString() + ") is not EventQueue's dispatch thread");
              Point p = new Point(0, 0);
              SwingUtilities.convertPointToScreen(p, component);
              region.x += p.x;
              region.y += p.y;
              return take(region);
         // Swing JComponent versions:
         * Takes a screen shot of <i>just</i> jcomponent
         * (no other gui elements will be present in the result).
         * <p>
         * Only {@link EventQueue}'s {@link EventQueue#isDispatchThread dispatch thread} may call this method.
         * <p>
         * @param jcomponent Swing JComponent to take a screen shot of
         * @return a BufferedImage representing jcomponent
         * @throws IllegalArgumentException if jcomponent == null
         * @throws IllegalStateException if calling thread is not EventQueue's dispatch thread
         public static BufferedImage take(JComponent jcomponent) throws IllegalArgumentException, IllegalStateException {
              if (jcomponent == null) throw new IllegalArgumentException("jcomponent == null");
              if (!EventQueue.isDispatchThread()) throw new IllegalStateException("calling thread (" + Thread.currentThread().toString() + ") is not EventQueue's dispatch thread");
              Dimension d = jcomponent.getSize();
              Rectangle region = new Rectangle(0, 0, d.width, d.height);
              return take(jcomponent, region);
         * Takes a screen shot of <i>just</i> the specified region of jcomponent
         * (no other gui elements will be present in the result).
         * <p>
         * Only {@link EventQueue}'s {@link EventQueue#isDispatchThread dispatch thread} may call this method.
         * <p>
         * @param jcomponent Swing JComponent to take a screen shot of
         * @param region the Rectangle <i>relative to</i> jcomponent that will be captured
         * @return a BufferedImage representing the region within jcomponent
         * @throws IllegalArgumentException if jcomponent == null; region == null
         * @throws IllegalStateException if calling thread is not EventQueue's dispatch thread
         public static BufferedImage take(JComponent jcomponent, Rectangle region) throws IllegalArgumentException, IllegalStateException {
              if (jcomponent == null) throw new IllegalArgumentException("jcomponent == null");
              if (region == null) throw new IllegalArgumentException("region == null");
              if (!EventQueue.isDispatchThread()) throw new IllegalStateException("calling thread (" + Thread.currentThread().toString() + ") is not EventQueue's dispatch thread");
              boolean opaquenessOriginal = jcomponent.isOpaque();
              Graphics2D g2d = null;
              try {
                   jcomponent.setOpaque( true );
                   BufferedImage image = new BufferedImage(region.width, region.height, imageType);
                   g2d = image.createGraphics();
                   g2d.translate(-region.x, -region.y) ;     // CRITICAL: this and the next line are what make region relative to component
                   g2d.setClip( region );
                   jcomponent.paint( g2d );
                   return image;
              finally {
                   jcomponent.setOpaque( opaquenessOriginal );
                   if (g2d != null) g2d.dispose();
         // -------------------- write --------------------
         * Writes image to a newly created File named fileName.
         * The graphics format will either be the extension found in fileName
         * or else {@link #formatNameDefault} if no extension exists.
         * <p>
         * Any thread may call this method.
         * <p>
         * @param image the BufferedImage to be written
         * @param fileName name of the File that will write image to
         * @throws IllegalArgumentException if image == null; fileName is blank
         * @throws IOException if an I/O problem occurs
         public static void write(BufferedImage image, String fileName) throws IllegalArgumentException, IOException {
              if (image == null) throw new IllegalArgumentException("image == null");
              if (StringUtil.isBlank(fileName)) throw new IllegalArgumentException("fileName is blank");
              File file = new File(fileName);
              String formatName = FileUtil.getExtension(file);
              if (formatName.length() == 0) formatName = formatNameDefault;
              write(image, formatName, file);
         * Writes image to file in the format specified by formatName.
         * <p>
         * Any thread may call this method.
         * <p>
         * @param image the BufferedImage to be written
         * @param formatName the graphics file format (e.g. "pnj", "jpeg", etc);
         * must be in the same set of values supported by the formatName arg of {@link ImageIO#write(RenderedImage, String, File)}
         * @param file the File that will write image to
         * @throws IllegalArgumentException if image == null; type is blank; file == null
         * @throws IOException if an I/O problem occurs
         public static void write(BufferedImage image, String formatName, File file) throws IllegalArgumentException, IOException {
              if (image == null) throw new IllegalArgumentException("image == null");
              if (StringUtil.isBlank(formatName)) throw new IllegalArgumentException("formatName is blank");
              if (file == null) throw new IllegalArgumentException("file == null");
              ImageIO.write(image, formatName, file);
         // -------------------- Test (inner class) --------------------
         * An inner class that consists solely of test code for the parent class.
         * <p>
         * Putting all the test code in this inner class (rather than a <code>main</code> method of the parent class) has the following benefits:
         * <ol>
         *  <li>test code is cleanly separated from working code</li>
         *  <li>any <code>main</code> method in the parent class is now reserved for a true program entry point</li>
         *  <li>test code may be easily excluded from the shipping product by removing all the Test class files (e.g. on Windoze, delete all files that end with <code>$Test.class</code>)</li>
         * </ol>
         * Putting all the test code in this inner class (rather than a shadow external class) has the following benefits:
         * <ol>
         *  <li>non-public members may be accessed</li>
         *  <li>the test code lives very close to (so is easy to find) yet is distinct from the working code</li>
         *  <li>there is no need to set up a test package structure</li>
         * </ol>
         public static class Test {
              public static void main(String[] args) throws Exception {
                   Gui gui = new Gui();
                   EventQueue.invokeLater( gui.getBuilder() );
                   new Timer(1000, gui.getTimerActionListener()).start();
              private static class Gui {
                   private Frame frame;
                   private TextField textField;
                   private JFrame jframe;
                   private JLabel jlabel;
                   private JPanel jpanel;
                   private int count = 0;
                   private Runnable getBuilder() {
                        return new Runnable() {
                             public void run() {
                                  System.out.println("Creating a Frame with AWT widgets inside...");
                                  frame = new Frame("ScreenShot.Test.main Frame");
                                  textField = new TextField();
                                  textField.setText( "Waiting for the screen shot process to automatically start..." );
                                  frame.add(textField);                              
                                  frame.pack();
                                  frame.setLocationRelativeTo(null);     // null will center it in the middle of the screen
                                  frame.setVisible(true);
                                  System.out.println("Creating a JFrame with Swing widgets inside...");
                                  jframe = new JFrame("ScreenShot.Test.main JFrame");
                                  jlabel = new JLabel(
                                       "<html>" +
                                            "To be, or not to be: that is the question:" + "<br>" +
                                            "Whether 'tis nobler in the mind to suffer" + "<br>" +
                                            "The slings and arrows of outrageous fortune," + "<br>" +
                                            "Or to take arms against a sea of troubles," + "<br>" +
                                            "And by opposing end them?" + "<br>" +
                                            "To die: to sleep; No more;" + "<br>" +
                                            "and by a sleep to say we end" + "<br>" +
                                            "The heart-ache and the thousand natural shocks" + "<br>" +
                                            "That flesh is heir to," + "<br>" +
                                            "'tis a consummation Devoutly to be wish'd." + "<br>" +
                                       "</html>"
                                  jpanel = new JPanel();
                                  jpanel.setBorder( BorderFactory.createEmptyBorder(20, 20, 20, 20) );
                                  jpanel.add(jlabel);
                                  jframe.getContentPane().add(jpanel);
                                  jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                                  jframe.pack();
                                  Point p = frame.getLocation();
                                  p.translate(0, frame.getSize().height  + 10);
                                  jframe.setLocation(p);
                                  jframe.setVisible(true);
                   private ActionListener getTimerActionListener() {
                        return new ActionListener() {
                             public void actionPerformed(ActionEvent evt) {
                                  try {
                                       switch (count++) {
                                            case 0:
                                                 displayMessage("Taking a screen shot of the entire desktop...");
                                                 ScreenShot.write( ScreenShot.take(), "desktop.png" );
                                                 break;
                                            case 1:
                                                 displayMessage("Taking a screen shot of the central rectangle of the desktop...");
                                                 Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
                                                 Rectangle region = getCenteredRectangle(d);
                                                 ScreenShot.write( ScreenShot.take(region), "desktopCenteredRectangle.png" );
                                                 break;
                                            case 2:
                                                 displayMessage("Taking a screen shot of the TextField...");
                                                 ScreenShot.write( ScreenShot.take(textField), "textField.png" );
                                                 break;
                                            case 3:
                                                 displayMessage("Taking a screen shot of the central rectangle of the TextField...");
                                                 d = textField.getSize();
                                                 region = getCenteredRectangle(d);
                                                 ScreenShot.write( ScreenShot.take(textField, region), "textFieldCenteredRectangle.png" );
                                                 break;
                                            case 4:
                                                 displayMessage("Taking a screen shot of the JLabel...");
                                                 ScreenShot.write( ScreenShot.take(jlabel), "jlabel.png" );
                                                 break;
                                            case 5:
                                                 displayMessage("Taking a screen shot of the central rectangle of the JLabel...");
                                                 d = jpanel.getSize();
                                                 region = getCenteredRectangle(d);
                                                 ScreenShot.write( ScreenShot.take(jpanel, region), "jpanelCenteredRectangle.png" );
                                                 break;
                                            default:
                                                 System.exit(0);
                                                 break;
                                  catch (Throwable t) {
                                       t.printStackTrace(System.err);
                             private void displayMessage(String text) {
                                  System.out.println(text);
                                  textField.setText(text);
                                  frame.pack();
                                  frame.invalidate();
                             private Rectangle getCenteredRectangle(Dimension d) {
                                  int x = d.width / 4;
                                  int y = d.height / 4;
                                  int width = d.width / 2;
                                  int height = d.height / 2;
                                  return new Rectangle(x, y, width, height);
    }

  • How to set content type for a JSF page

    Hi,
    I want to know is there any way we can specify the content type of a JSF page, like in JSPs we have the page attribute <%@ page contentType="application/vnd.ms-excel" %>
    In JSP we can create a html table with values and if we specify the contenType as application/vnd.ms-excel, we would get an excel file generated.
    But do we have something similar to this is JSF, as I am using Facelets I cannot use page directive in the xhtml file.
    I tried setting the content type in MangedBean's action as follows
    ((HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse()).setContentType("application/vnd.ms-excel"); but it did'nt work.
    Thanks in advance.

    //add related mutip-part to combine parts
    MimeMultipart multipart = new MimeMultipart("related");
    //attach a pdf
    messageBodyPart = new MimeBodyPart();
    fds = new FileDataSource("h:/something.pdf");
    messageBodyPart.setDataHandler(new DataHandler(fds));
    messageBodyPart.setFileName(fds.getName());
    multipart.addBodyPart(messageBodyPart);
    //add multipart to the message
    message.setContent(multipart);
    //send message
    Transport.send(message);

  • How can the content height of an iWeb page be reduced below zero?

    In some of my iWeb "Photo" pages, there is a large amount of white space, below the last photos, that I can not reduce. In Inspector/Page/Layout, Content Height is 0 px, but the unwanted bottom white space can be as great as the top space occupied by photos. The problem comes when double-clicking on a photo that resides near the bottom of the page: the new page opens at its TOP, but the enlarged photo can be in the white space at the bottom of the page. Scrolling up is then necessary EACH TIME just to view the enlarged photo.
    My question, why is there empty white space at the bottom of my photo pages, and how can I get rid of it?

    And it remains a puzzlement!
    I followed your suggestions, but nothing changed: there is still excess white space below pictures in some of my albums.
    Maybe the reason is that my domain files are not in User/Library/Application Support/iWeb folder. They are in User/Sites, and their are three of them now. When I first started using Web years ago, User/Sites is where domains were found and I had only two of them (my travel photos and the pages for my Mac user group, SMUG.net). Last March I added a third site, but by then iWeb no longer allowed creating more than one domain file. So SMUG and the new site co-existed in the second domain file. Eventually, I duplicated the domain file, deleted the SMUG site from one of the duplicates, and the new site from the other domain file. The result is that I got three domain files.
    I don't think having three domain files caused the problem that I am having, as I did not add new photos to my travel domain until late May at the least, when my photos of Portugal were entered. And not all those Portugal photo albums have the excess white space below the pictures.
    Do you have other suggestions I might try? As other strange happenings have been occurring now and then in my Mac, I've been considering reinstalling OS 10.6 for a while now.

  • Margin that will push content to the bottom of page..

    Hello again!
    This time I'm trying to make a footer that will stay on the bottom of the page even when there is little content. But when there is a lot of content I don't want it to stick to the bottom of the browser window even when I scroll down. My solution was to give the container some kind of margin to push the footer down but I don't know what. A sort of "liquid" footer? Is this even possible?

    Like this?:
    http://www.cssstickyfooter.com/
    http://ryanfait.com/sticky-footer/
    E. Michael Brandt
    www.divahtml.com
    www.divahtml.com/products/scripts_dreamweaver_extensions.php
    Standards-compliant scripts and Dreamweaver Extensions
    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, et alia

  • How to hide content in my page..

    Hello support,
    How can i hide my discussions, to be shown in my page, exacting how to hide contents tab in my SCN page so that no one can see my discussions, who visit to my page.
    Thanks.

    No. You can't hide the content tab from your profile.
    I can see you haven't posted any discussion yet. Why you want to hide it ?

  • Div to bottom of content to browser bottom

    I want to have a div at the bottom (footer) of my content
    area on the page that will stretch to the bottom of the browser
    window when there is very little content in the content divs above
    it, and if there is a lot of content, it gets pushed down and when
    they scroll, it's still at the bottom of the content reaching the
    bottom of the browser window. Does this make sense? Basically,
    it'll be a color block below the content, with some links and
    possibly a background image that repeats x.
    Here is the current code and I want to add a div below the
    content area that's in a Dreamweaver template:
    <body background id = "background" leftmargin="0"
    topmargin="0" marginwidth="0" marginheight="0">
    <div id = "all"><div id="logo">
    <p><img src="../images/logo.png" alt="Alain Locke
    Logo" width="222" height="188" /></p>
    <div id="left_nav">
    <p><a
    href="../calendar.html">Calendar</a></p>
    <p><a href="../events.html">Special
    Events</a></p>
    <p><a
    href="../teachers.html">Teachers</a></p>
    <p><a
    href="../parents.html">Parents</a></p>
    <p><a
    href="../family_resource_learning_center.html">Family Resource
    &amp; Learning Center</a></p>
    <p><a
    href="../community_resource.html">Community
    Resourrce</a></p>
    <p><a href="../news.html">In the News</a>
    </p>
    </div>
    <p>  </p>
    </div>
    <div id="header">Alain Locke Charter
    Academy</div>
    <div id="nav"><a
    href="../index.html">Home</a> <img
    src="../images/bullet.jpg" width="4" height="4" /> <a
    href="../about_alain_locke.html">About Alain Locke</a>
    <img src="../images/bullet.jpg" width="4" height="4" /> <a
    href="../admissions.html">Admissions</a> <img
    src="../images/bullet.jpg" width="4" height="4" /> <a
    href="../academics.html">Academics</a> <img
    src="../images/bullet.jpg" width="4" height="4" /> <a
    href="../support_alain_locke.html">Support Us</a>
    </div>
    <div id="content"><!-- TemplateBeginEditable
    name="Content" -->Content for id "content" Goes Here<!--
    TemplateEndEditable --></div>
    </div>
    </body>

    I tried the Sticky Footer and am having some issues, probably
    due to my code (pasted below).
    1. The footer pushes up to above my content div unless I
    clear floats. And it won't stick to the bottom either way.
    2. My left side links lose their vertical spacing. I tried
    adding padding (and margin) and that made no difference.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=ISO-8859-1" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Alain Locke Charter Academy</title>
    <!-- TemplateEndEditable -->
    <link href="../style.css" rel="stylesheet" type="text/css"
    />
    <!--[if lt IE 7.]>
    <script defer type="text/javascript"
    src="pngfix.js"></script>
    <![endif]-->
    <!-- TemplateBeginEditable name="head" --><!--
    TemplateEndEditable -->
    </head>
    <body background id = "background" leftmargin="0"
    topmargin="0" marginwidth="0" marginheight="0">
    <div id = "all"><div id="logo">
    <p><img src="../images/logo.png" alt="Alain Locke
    Logo" width="222" height="188" /></p>
    <div id="left_nav">
    <p><a
    href="../calendar.html">Calendar</a></p>
    <p><a href="../events.html">Special
    Events</a></p>
    <p><a
    href="../teachers.html">Teachers</a></p>
    <p><a
    href="../parents.html">Parents</a></p>
    <p><a
    href="../family_resource_learning_center.html">Family Resource
    &amp; Learning Center</a></p>
    <p><a
    href="../community_resource.html">Community
    Resourrce</a></p>
    <p><a href="../news.html">In the News</a>
    </p>
    </div>
    <p>  </p>
    </div>
    <div id="header">Alain Locke Charter
    Academy</div>
    <div id="nav"><a
    href="../index.html">Home</a> <img
    src="../images/bullet.jpg" width="4" height="4" /> <a
    href="../about_alain_locke.html">About Alain Locke</a>
    <img src="../images/bullet.jpg" width="4" height="4" /> <a
    href="../admissions.html">Admissions</a> <img
    src="../images/bullet.jpg" width="4" height="4" /> <a
    href="../academics.html">Academics</a> <img
    src="../images/bullet.jpg" width="4" height="4" /> <a
    href="../support_alain_locke.html">Support Us</a>
    </div>
    <div id="content"><!-- TemplateBeginEditable
    name="Content" -->
    <p>This is content area. It's in an editable region of
    this template. </p>
    <p> </p>
    <p> </p>
    <p>I have a wrapper div named all - and other divs in
    there. Since I have the logo breaking the bounds of the top banner
    on the left side, just above the left side nav, I made those float
    left. </p>
    <p> </p>
    <p>The main issue I'm having is making the footer stay
    on the bottom of the browser. This sticky footer seems promising,
    but not working for me yet.</p>
    <p> </p>
    <p>I need to try it all over again and see what
    happens. One other thing I noticed, after I added the sticky footer
    style stuff to my style sheet, my left side nav text is vertically
    on top of each other instead of spaced nicely like I had them. I
    don't see p tags in the style code I copied over. Not sur why that
    is happening. </p>
    <p> </p>
    <p>And the footer is not pushing down like it should.
    Float. </p>
    <p> </p>
    <p>Testing.</p>
    <p> </p>
    <p>Testing.</p>
    <p> </p>
    <p>Testing.</p>
    <p> </p>
    <p>Testing.</p>
    <p> </p>
    <p>Testing.</p>
    <p> </p>
    <p> </p>
    <!-- TemplateEndEditable --></div>
    <div class="push"></div>
    </div>
    <div id="footer">
    <div align="center">Content for id "footer" Goes
    Here</div>
    </div>
    </body>
    </html>

  • How do I make sidebar div move with the content div in Firefox 14?

    Hello,
    The sidebar div blocks the content div in Firefox 14 when the browser window is resized smaller. In other browsers, this is not a problem.
    The website url is: www.gaddislaw.com
    Thanks for your help!

    I assume you want the main content text to be 'flexible' i.e., narrow and widen when you alter the size of the browser window. If so amend your 'content' css to as below:
    .content {
    padding-top: 25px;
    padding-bottom: 10px;
    margin-left: 290px;
    margin-right: 40px;

  • How to separate content area from the image area in cs6

    how to separate content area from the image area in cs6? looks just fine in design view but when opened up in explorer my text /content area is over the image area. the content is suppose to be below the image not over it. How do I move it down? Everything I have tried has not worked ;(

    Is your image in the CSS (background) or the HTML (foreground)? 
    Try copying and pasting this code into a new, blank document.  Change placehold.it images to your own.  Save and preview in browsers.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with CSS 2-Col Layout</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--[if IE]>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <![endif]-->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <style>
    /**CSS Reset**/
        padding: 0;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    img {
        width: 100%;
        vertical-align: baseline;
    /**Layout**/
    body {
        padding: 0;
        width: 90%; /**adjust width in px or % as desired**/
        margin: 0 auto; /**this is centered**/
        background: #CFF;
        color: #505050;
        font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
        font-size: 100%;
        box-shadow: 2px 2px 4px #333;
    header {
        margin: 0;
        padding: 0 1%;
        width: 100%;
        background: #B00202;
        color: #FFF;
    /**top menu**/
    nav {
        background: #EAEAEA;
        font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 14px;
        font-weight: bold
    nav ul {
        margin: 0;
        padding: 0;
    nav li {
        list-style: none;
        display: inline-block;
        margin: 0 3% 0 5%;
    /**menu link styles**/
    nav li a {
        color: #666;
        text-decoration: none;
        line-height: 2.5em;
        padding: 6px;
        border: 1px solid #CCC;
    /**on select or mouseover**/
    nav li a:hover, nav li a:active, nav li a:focus {
        background: #CCC;
        color: #505050;
    #wrapper {
        background: #EAEAEA;
        overflow: hidden; /**float contaiment**/
    /**main content**/
    article {
        padding: 0 2%;
        background: #FFF;
        float: left;
        width: 70%;
    figure {
        width: 80%;
        margin: 4% auto 4% auto;
        text-align: center;
    /**right sidebar**/
    aside {
        padding: 0 2%;
        float: left;
        width: 30%;
    footer {
        clear: both;
        background: #B00202;
        color: #FFF;
        text-align: center;
        margin: 0;
    /**typography**/
    header h1, header h2 {
        display: inline;
        color: #F5DD83;
        padding: 0 1%;
    h3 {
        color: #2294AE;
        margin-bottom: 0
    p { margin: 0 0 1em 0 }
    figcaption {
        text-align: center;
        font-style: oblique;
        font-size: small;
        color: #2294AE;
    </style>
    </head>
    <body>
    <!--begin header-->
    <header> <h1>Sitename</h1>
    <h2>|  Responsive CSS Layout</h2>
    </header>
    <!--begin navigation-->
    <nav>
    <ul>
    <li><a href="#">Menu Item1</a></li>
    <li><a href="#">Menu Item1</a></li>
    <li><a href="#">Menu Item1</a></li>
    <li><a href="#">Menu Item1</a></li>
    <li><a href="#">Menu Item1</a></li>
    </ul>
    </nav>
    <div id="wrapper">
    <!--begin main content-->
    <img class="banner" src="http://placehold.it/1056x100/198EBA/FFFFFF&text=Banner.jpg" alt="banner" />
    <article> <h3>Article</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Mauris vitae libero lacus, vel hendrerit nisi!  Maecenas quis velit nisl, volutpat viverra felis. Vestibulum luctus mauris sed sem dapibus luctus.  Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus.  Aenean tristique enim ut ante dignissim. </p>
    <figure> <img src="http://placehold.it/500x325" alt="placeholder">
    <figcaption>Figure 2 Caption</figcaption>
    </figure>
    </article>
    <!--begin right sidebar-->
    <aside> <h3>Aside</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Mauris vitae libero lacus, vel hendrerit nisi!  Maecenas quis velit nisl, volutpat viverra felis. Vestibulum luctus mauris sed sem dapibus luctus. </p>
    <hr>
    <p>Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus.  Aenean tristique enim ut ante dignissim. </p>
    <hr>
    <p>Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus.  Aenean tristique enim ut ante dignissim. </p>
    </aside>
    <!--end wrapper--></div>
    <!--begin footer-->
    <footer> <small>© 2014 Your Site Name. All rights reserved</small> </footer>
    </body>
    </html>
    Nancy O.

  • Placing content at the bottom of each page

    I have a dynamic form with several content areas that are hidden until certain options are checked. Upon opening the form it is 1 page long, but can easily spread out to 3 pages or more after fields are filled. I want to be able to have content placed at the bottom of each page such as a customers name. I have tried the pagination overflow trailer (Which I figured out has to be a subform that trails) But the problem I am having is that instead of placing it at the bottom of the page it places the field right underneath the last subform that fits on the page. Sometimes that subform will be a couple inches up the page because the next subform will be 4 inches tall. I just want the content to be on the very bottom of each page. How would I adjust this? Thanks

    You can place the Fields in the Master Page that you want to be displayed on each page.
    You can adjust the Content area in the Master pages to be above the fields at the bottom of the page so that the data will always be displayed at the bottom.
    Thanks
    Srini

  • Can't get the content div to extend beneath the last div

    Once again, I seek help for my site www.acemon.com
    I can't get .content to extend below the last div. When you look at the site, you can see the last box (titled "for realtors") is surrounded by the .container color instead of the .content color.

    You have an extra div at clickhere and clickhere2:
    <div class="clickhere">
           <a href="premium.html">
           <img src="Images/click-sample.png" alt="Value2" width="150" height="50" /></a></div>
           </div> <!--end of .clickhere-->
    </div> <!--end of .choice-->
    <div class="clickhere2">
           <a href="value.html">
           <img src="Images/click-realtor.png" alt="Realtors" width="152" height="50" /></a></div>
           </div> <!--end of .clickhere-->
           </div> <!--end of .choice-->
    Then, replace:
    </div> <!--end of .clickhere-->
           </div> <!--end of .choice-->
    <!-- </div> end of .content-->
    <!-- </div> end of .container-->
    with this at the bottom:
    </div> <!--end of .clickhere-->
           </div> <!--end of .choice-->
    </div><!--  end of .content-->
    </div><!--  end of .container-->
    i.e. put the divs outside the comments.
    This should then validate.

  • AP element on centered content div

    I'm trying to position an AP element relative to a content
    div centered in the browser window but so far nothing has worked,
    and I would rather not use relative positioning.
    Any help would be greatly appreciated.

    > didn't cross my mind to use relative positioning for the
    wrapper div
    > itself
    It should have.
    This may help you understand positioning a bit -
    There are 4 different types of positioning:
    Absolute
    Relative
    Fixed
    Static
    Here is a brief explanation of each kind of positioning (with
    regard to
    placement of elements on the page only)....
    Position:absolute (or A/P elements)
    This does several things -
    1. It 'removes' the element from the flow of the code on
    the page so that
    it can no longer influence the size or position of any other
    page element
    (except for those contained within it, of course).
    2. The absolutely positioned element takes its position from
    the position of
    its closest PARENT *positioned* element - in the
    absence of any explicitly
    positioned parent, this will default to the <body> tag,
    which is always
    positioned
    at 0,0 in the browser viewport.
    This means that it doesn't matter where in the HTML code the
    layer's code
    appears (between <body> and </body>), its
    location on the screen will not
    change (this assumes that you have not positioned the A/P
    element within
    a table or another A/P element, of course).
    Furthermore, the space in
    which
    this element would have appeared were it not positioned
    is not preserved
    on the screen. In other words, absolutely positioned elements
    don't take
    up any space on the page. In fact, they FLOAT over the page.
    Position:relative (or R/P elements)
    In contrast to absolute positioning, a relatively positioned
    page element is
    *not* removed from the flow of the code on the page, so
    it will use the
    spot
    where it would have appeared based on its position in
    the code as its
    zero point reference. If you then supply top, right,
    bottom, or left
    positions
    to the style for this element, those values will be
    used as offsets from
    its
    zero point.
    This means that it DOES matter where in the code the
    relatively positioned
    element appears (, as it will be positioned in that location
    (factoring in
    the offsets) on the screen (this is true for any placement in
    the code).
    Furthermore, the space where this element would have
    appeared is
    preserved in the display, and can therefore affect the
    placement of
    succeeding elements. This means that the taller a relatively
    positioned element is, the more space it forces on the page.
    Position:static
    As with relative position, static positions also "go with
    the flow". An
    element with a static position cannot have values for
    offsets (top, right,
    left, bottom) or if it has them, they will be ignored. Unless
    explicitly
    positioned, all div elements default to static positioning.
    Position:fixed
    A page element with this style will not scroll as the page
    content scrolls.
    Support for this in elements other than page backgrounds is
    quirky
    There are several other things you need to know:
    1. ANY page element can be positioned - paragraphs, tables,
    images, lists,
    etc.
    2. The <div> tag is a BLOCK level tag. This means that
    if it is not
    positioned or explicitly styled otherwise, a) it will always
    begin on a new
    line on the screen, and b) it will always force content to a
    new line below
    it, and c) it will always take up the entire width of its
    container (i.e.,
    width:100%).
    3. The placement of A/P elements *can* affect the BEHAVIOR of
    other
    elements
    on the page. For example, a 'layer' placed over a hyperlink
    will mask that
    hyperlink.
    You can see a good example of the essential difference
    between absolute and
    relative positioning here -
    http://www.great-web-sights.com/g_layersdemo.asp
    You can see a good demonstration of why using layers for a
    page layout tool
    is dangerous here -
    http://www.great-web-sights.com/g_layer-overlap.asp
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "JimHawkins" <[email protected]> wrote in
    message
    news:[email protected]...
    > Thank you! That solved my problem.
    >
    > By the way, when I said I didn't want to use relative
    positioning, I was
    > referring to the elements I wanted to position within
    the wrapper div; it
    > didn't cross my mind to use relative positioning for the
    wrapper div
    > itself. I
    > should have been more clear.
    >

  • I want my content div to the right of sidebar

    I'm building a page from scratch (to my specs for layout of
    other pages in my site), blank HTML, fixed at 780 pixels. I have
    all of my divs in place but I want my sidebar (which will be my nav
    bar) to the left of the page and all the way down, and to the left
    of my content, but my content is positioned under my sidebar and
    spans across the width of the page. I want my content to the right
    of the sidebar and under the header. Can someone tell me what rules
    I should edit to get this to happen.
    I attached my code. Thanks.

    Hello,
    Float the sidebar left, like so:
    #sidebar {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #e8e8e8;
    width: 200px;
    float: left;
    Give the content div a left margin of 210px.
    I also added some padding. Adjust as needed.
    #content {
    background-color: #121922;
    padding: 10px;
    margin: 0px 0px 0px 210px;
    font-family: Arial, Helvetica, sans-serif;
    color: #e8e8e8;
    The content of the divs will determine the height.
    If you want the sidebar to appear to be the same height as
    the content div,
    check out this technique:
    http://www.alistapart.com/articles/fauxcolumns/
    Take care,
    Tim
    "Rock Artist" <[email protected]> wrote in
    message
    news:[email protected]...
    > I'm building a page from scratch (to my specs for layout
    of other pages in
    > my
    > site), blank HTML, fixed at 780 pixels. I have all of my
    divs in place but
    > I
    > want my sidebar (which will be my nav bar) to the left
    of the page and all
    > the
    > way down, and to the left of my content, but my content
    is positioned
    > under my
    > sidebar and spans across the width of the page. I want
    my content to the
    > right
    > of the sidebar and under the header. Can someone tell me
    what rules I
    > should
    > edit to get this to happen.
    >
    > I attached my code. Thanks.
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=UTF-8" />
    > <title>Photo Gallery</title>
    > <style type="text/css">
    > <!--
    > body {
    > background-color: #e8e8e8;
    > text-align: center;
    > margin: 0px;
    > padding: 0px;
    > }
    > #wrapper {
    > text-align: left;
    > width: 780px;
    > margin-top: 0px;
    > margin-right: auto;
    > margin-bottom: 0px;
    > margin-left: auto;
    > }
    > #header {
    > height: 180px;
    > background-color: #121922;
    > }
    > #sidebar {
    > font-family: Arial, Helvetica, sans-serif;
    > background-color: #e8e8e8;
    > width: 200px;
    > }
    > #content {
    > background-color: #121922;
    > margin-top: 0px;
    > padding-top: 0px;
    > padding-left: 200px;
    > font-family: Arial, Helvetica, sans-serif;
    > color: #e8e8e8;
    > }
    > #footer {
    > margin-top: 12px;
    > margin-bottom: 12px;
    > clear: both;
    > }
    > -->
    > </style>
    > </head>
    >
    > <body>
    > <div id="wrapper">
    > <div id="header"></div>
    > <div id="sidebar">This will be my navigation bar
    with all of my pages
    > listed............right here.........</div>
    > <div id="content">Content for id "content" Goes
    Here and I wonder if I
    > fill
    > this up some that it will actually move to the right off
    my sidebar and it
    > did,
    > but why is my content section not going all the way to
    the top next to the
    > header div? Maybe I should give it a fixed size and
    float it to the right.
    > </div>
    > <div id="footer">Content for id "footer" Goes
    Here</div>
    > </div>
    > </body>
    > </html>
    >

  • How to place content between header and tabs?????

    i have header part which has to be constant through out the portal but below that i have 3 links
    like I AM employee,employer,broker..
    which has to be shown only in home page above tabs..
    how can i achieve this..
    how to place content between header and tabs..:(kindly help..

    Hi Samiran
    Try these approaches and see if that works.
    1. In the Header Section, you header footer shell and add a Header Portlet. This Header Portlet associated JSP file will have all static content in the top section. In the bottom section, add these 3 links say to right hand corner. Show these links only based on some request property like isHome. Now for the main book having Home and other page associate a BackingFile. Within this backing file in the lifecycle methods like preRender or handlePostBack, get instance of BookManager and all the pages and see which page is Active. For that active page check its page definition label which will be always unique. IF the page def label is like home_page_def (this is page def label you give for home page), then set the key value in the request property like isHome=true. By only doubt is after Book backingfile is triggered, the header has to be reloaded, because only then it can pick up the request attributes.
    2. Create a brand new portlet like HomePageLinks portlet. Make its Title Property Not Visible, and other user interface properties like NoBorder, NoTheme etc. The associated JSP will have the 3 links you mentioned right aligned. You can use css styles to make it right etc. Now drop this portlet in the Header Shell area. You already have HeaderPortlet in the top, below that you will have this HomePageLinks portlet. Now associate a backing file for this Portlet to show, only if the Books current active page is Home page by comparing the def label etc as mentioned above.
    In both scenarios, only concern is when we click on different Pages, the entire portal has to be rendered right from the Top Header. Only then the backing file will set the key, and the HomePageLinks portlet can show or hide accordingly.
    Try firing an Event when the Home page is clicked. This listener for this Event can be the HomePageLinks Portlet. I guess Event mechanism should work irrespective of where the portlet is placed. In the event listner, see if you can show/hide this portlet.
    The only challenge is Header section needs to reloaded everytime you click on a Tab.
    Start putting some backing files and System.out.printlns to see if the Header section gets reloaded on click on any Tabs.
    These are just my thoughts over the top of my head. Other forum users can have better alternatives or a different version of above approaches.
    Thanks
    Ravi Jegga

  • PHP Form in Spry Tabbed Content Div

    I have placed some PHP forms inside some Spry Tabbed Content
    divs. When the forms are submitted, the page reloads with the
    default tabbed content displayed instead of the tab where the form
    is. If I click to the tab with the form, I can see the information
    PHP properly returned.
    Does anybody know how to make the Spry Tabbed Content script
    return to the tab that had focus when a PHP form is submitted
    instead of the default tab?
    Thanks in advance for any advice.

    Hi,
    On the main forum page you will have read the following.
    Announcement: New to Spry, or  the Spry forums?
    Hide Details
    Before you post a topic please verify that:
    You are using the latest Spry files
    The latest version of the Adobe Spry Framework is 1.6.1, this is the same version that ships with Dreamweaver CS4. If you use Dreamweaver CS3 (uses Spry 1.4), its wise to upgrade your files to the latest version. This can easily be done using the Spry Updater that can be found here.
    After you have upgraded and not removed the remarks from the Spry files, we will have another look at it.
    Ben

Maybe you are looking for

  • Key fn + Backspace does not work with apple wireless keyboard

    Hello, I want to user the WIndows Key DEL. However, the apple wireless keyboard dosn't have such a key. I read, that FN + Backspace will solve this. It does not work on my apple wireless keyboard. I'm using BootCamp 3.2 and WIndows XP, running on a M

  • Update termination with BAPI_FIXEDASSET_CHANGE

    Hello, We want to capture the serial number of an asset at the point of goods receipt. There does not appear to be any standard functionality to do this so I am making use of a BAdI in transaction MIGO. But I am encountering a problem with BAPI_FIXED

  • Information about bde_chk_cbo.sql

    Hi All, I want my database to be configiured as per bde_chk_cbo.sql. My apps version -12.1.3 and db version is 11.2.0.3 I have run the bde_chk_cbo.sql. Now How i will which parameter is to confiogured as per bde_chk_cbo.sql. dentification Date:     0

  • Error in Posting IDoc

    Hi All, I am getting the following error while posting an IDoc from XI to R3 in (SXMB_MONI). <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Call Adapter   --> - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http

  • Canon 40D RAW Files and Leopard???

    Hi all, Haven't actually bought Leopard yet (have to wait till pay day!!) but have a pretty serious question to ask. Has anyone tried opening the RAW files from a Canon 40D on Leopard?? Just I know that in 10.4.10 they are simply unsupported. Just in