Skip navigation
d4com
Currently Being Moderated

Text position in editable region

Aug 1, 2012 3:26 PM

Hi everyone

 

i'm really new to this web design stuff and i'm hoping you can help me with a simple text position problem.

 

On my site i have a background image and an editable region surrounding it, problem is that when i put text in to it the text goes right up against the edge of the frame. Can anyone suggest how i can stop the text going right to the edge?

 

Thanks

 
Replies
  • Currently Being Moderated
    Aug 1, 2012 3:50 PM   in reply to d4com

    First thing you need to understand - an editable region is NOT a layout region.  The layout would be determined by what is *in* the editable region.  Editable regions in and of themselves have no impact on any layout.

     

    Now - to answer your question we would need to see your page's code - can you paste it into a reply here (note - email will not work.  To do this, you will need to come to the webforum and paste your code into a reply).

     

    Just so you'll know, DW will expect you to have a fair amount of familiarity with HTML and CSS.  If you do not, then you are in for a long, hard slog....

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 2, 2012 12:24 AM   in reply to d4com

    Are you wanting to insert text into the 'content' editable region. if so add some padding to the 'content' css to position the text away from the edge of it. (see below) Note that padding gets added to the overall width of the <div> so to account for that you need to reduce the 'content' <div> width by 30px (see below) because 15px left and right padding have been added the width becomes 738px instead of 768px.

     

     

     

     

    #content {

    width: 738px;

    padding: 15px;

    height: 690px;

    z-index: 1;

    left: 108px;

    top: 213px;

    background-image: url(../images/content.png);

    margin-right: auto;

      margin-left: auto;

    margin-top: 50px;

    margin-bottom: 0px;

      }

     

     

    To avoid the tricky stituation regarding padding being added to the width of the <div> you could just use <p></p> tags inside of the 'content' <div>

     

    <div id="content">

    <p>Here is some text</p>

    </div>

     

    Then set the padding on the <p> tag like:

     

    #content p {

    margin: 0;

    padding: 15px;

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 2, 2012 4:12 AM   in reply to d4com

    Actuallly there are some big errors there (and which version of DW are you using?):

     

    1.  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

         <title>Rochdale Rostrum</title>

     

    You have no editable region around the title.  This will mean that ALL of your pages will have the same title, i.e., you will not be able to edit the title on the child pages.  Normally, when you create a template in DW, you get an editable region placed around the title tag so that you *can* edit it on child pages.  The only way to NOT get this is to manually delete it from the code.  This is actually consistent with the "upside-down" appearance of the rest of the code in the head region, and with the following error.

     

    2.  <div align="left"><!-- TemplateBeginEditable name="header" -->header<!-- TemplateEndEditable -->

         <div align="center"><img src="../images/banner.png" alt="banner" width="683" height="103" vspace="20" /></div>

         </div>

         </head>

     

    You cannot have div tags in the head region!  How did those get there?

     

    3.  Just as you normally get an editable region around the title tag called 'doctitle', you also normally get an editable region in the head (just before </head>) called 'head'.  Your code does not have this region either.

     

    I'm surprised that DW allows you to use this page as a template without complaining!  Anyhow, to fix this, change this -

     

    <title>Rochdale Rostrum</title>

     

    to this -

     

    <!-- TemplateBeginEditable name="doctitle" --><title>Rochdale Rostrum</title><!-- TemplateEndEditable -->

     

    and this -

     

    <div align="left"><!-- TemplateBeginEditable name="header" -->header<!-- TemplateEndEditable -->

    <div align="center"><img src="../images/banner.png" alt="banner" width="683" height="103" vspace="20" /></div>

    </div>

    </head>

     

    to this -

     

    <!-- TemplateBeginEditable name="head" -->

    <!-- TemplateEndEditable -->

    </head>

     

    and this -

     

    <body>

     

    to this -

     

    <body>

    <div align="left"><!-- TemplateBeginEditable name="header" -->header<!-- TemplateEndEditable -->

    <div align="center"><img src="../images/banner.png" alt="banner" width="683" height="103" vspace="20" /></div>

    </div>

     

    and perhaps that will get you a valid template file.

     

    Don't forget to tell how the normal template got into this condition!

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 2, 2012 4:15 AM   in reply to MurraySummers

    And by the way, the "vspace" attribute on the image tag has been deprecated in favor of CSS (padding).  It won't cause problems, but your page won't validate with the XHTML doctype and the vspace attribute. The same is true of the "align" attribute which you have used in the <div> tags.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2012 6:23 AM   in reply to d4com

    I don't know of any way (using CS6) to get a template file that doesn't have those editable regions in the head already placed for you.  Did you manually delete them after creating the template?  Can you remember the method you used to create the template?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2012 6:29 AM   in reply to d4com

    When you saved it, did you use FILE | Save As Template...?  Or did you just use FILE | Save... and save it in the Templates folder with a dwt extension?  I just tested, and that latter method will reproduce your missing editable regions!  OK - that's a bug.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2012 6:40 AM   in reply to d4com

    If you use FILE | Save as Template..., then the editable regions will be automatically added by DW.  If you just use FILE | Save..., or FILE | Save As...., they will not.  I have filed this as a bug.

     
    |
    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