Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Layout spacing

Explorer ,
Feb 24, 2017 Feb 24, 2017

Hi! I have been using <br> to create space between divisions (footer, paragraph etc). I'm trying to figure how to do this with css designer in Dreamweaver. As I'm a novice could anyone point me in the right direction please?

Thanks, Jon

589
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 24, 2017 Feb 24, 2017

Br's or line breaks, are not the proper way to create spacing between areas.  What you want to be using is margins and padding on your container elements or paragraphs to give them the proper spacing that you are looking for.  Below are some links discussing the topic.  Or we could work with a live example if you are willing to post a link.

CSS Margin

CSS Padding 

Translate
Community Expert ,
Feb 24, 2017 Feb 24, 2017

Br's or line breaks, are not the proper way to create spacing between areas.  What you want to be using is margins and padding on your container elements or paragraphs to give them the proper spacing that you are looking for.  Below are some links discussing the topic.  Or we could work with a live example if you are willing to post a link.

CSS Margin

CSS Padding 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 24, 2017 Feb 24, 2017

That works fine, thanks. The only problem is that for aesthetics, I'd like to leave a margin after the footer. I've increased the padding etc. but the contents just get pushed down to the edge of the footer. So no clear margin aftetr the contents of the footer. I'm missing something..

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2017 Feb 24, 2017

It's really hard to tell without a link to your page.  Margins are applied to a class/id/element on a page so just because you have margins in one place doesn't mean it has to be in another (ie: footer).  Can we see the page in question to help with your particular situation?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2017 Feb 24, 2017
LATEST

<footer>

     <p>This is some footer text</p>

</footer>

CSS:

footer {

     border:1px solid green; /**for demo purposes**/

     padding:2%;

}

footer p {margin-bottom:75px}

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2017 Feb 24, 2017

Using break tags and space bar to add space is not going to work well on the web.  You're dealing with a flexible medium here, not a printed page.

Start by learning all you can about CSS margins, padding and borders (the CSS box model).  This is beginner basics 101.

CSS Box Model

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 24, 2017 Feb 24, 2017

thank you very much

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines