Skip navigation
MandyPepperidge
Currently Being Moderated

Template Issues

Jun 12, 2012 11:33 AM

Tags: #template #dreamweaver_templates

Good morning!  I need help     I have created a template for all of my pages preceding my home page.  I have two floating 480 px divs on top, two large content areas below and a footer.  Pretty simple right?  Each time I add an editable region my page completely shifts leaving gaps between the divs.  Any ideas why?  My main content area below the divs is set to relative and clear both.  I have never had this happen before. Thanks!

 
Replies
  • Currently Being Moderated
    Jun 12, 2012 11:37 AM   in reply to MandyPepperidge

    Each time I add an editable region my page completely shifts leaving gaps between the divs.  Any ideas why?  My main content area below the divs is set to relative and clear both.  I have never had this happen before. Thanks!

     

    Most likely your code on the page is invalid, but we cannot know without actually seeing what you have.  Can you show us the code on your Template page?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 12, 2012 12:05 PM   in reply to MandyPepperidge

    First comment is that this is not a template page so it cannot contain an editable region.

     

    Can we see the template page after you have inserted the editable region that makes your page go haywire?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 12, 2012 12:13 PM   in reply to MandyPepperidge

    Both sets of code are valid XHTML.  I don't see anything in either editable region that would serve as a layout buster.  Do you have one of the sideways pages uploaded so we can see what you are talking about?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 12, 2012 2:16 PM   in reply to MandyPepperidge

    What's in your CSS (styletemplate.css)?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 12, 2012 2:37 PM   in reply to MandyPepperidge

    Try adding this to your CSS -

     

    #textbox, #bodytext { overflow:hidden; }

     

    Does that kill the gaps?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2012 4:59 AM   in reply to MandyPepperidge

    The gaps are commonly occuring on layout pages.  They result in this kind of situation -

     

    <div><img></div>

    <div>

         <h1>Some text</h1>

    </div>

     

    What happens is that the top margin of the <h1> tag escapes from the bounding box (the div container), and pushes that container down from the one preceding it.  In your case, there were two gaps, one from an <h#> tag, and one from a <p> tag (I'm guessing here).  By adding the overflow:hidden style to both of those text containing ids, you force the container to prevent that margin from escaping and the gap is closed.  The gap in design view is likely just caused by the visual aid of the cyan tab for the editable region....

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points