Solved

The correct way to create some space.

Posted on 2013-06-02
2
328 Views
Last Modified: 2013-06-02
I have used FrontPage for years to write crummy HTML, but not am redoing my pages with css and having to learn html
I keep running into places where a pargraph runs into an image.2 <br> tags side by side seem to work, but am not sure if this is proper
I know i could also use a <div> tag with a margin or padding
I like using the <p>&nbsp;</p> as my <p> tag is styled to use the proper text

If i use the <p> tag it does not validate
This segment does not validate unlkess i do this <p>&nbsp;</p>
A <br> tag does not create enough space
Some Content
<p>
 <div style="text-align:center">
 <figure>
 <figcaption>Sheathing Replaced</figcaption>
 <img src="images/SkyLight/Newsheathing.jpg" width="400" height="147" alt="New osb sheathing installed" title=""/>
 </figure>
 </div><!--align:center-->
</p>


This works
Some Content
 <br /><br />
 <div style="text-align:center">
 <figure>
 <figcaption>Sheathing Replaced</figcaption>
 <img src="images/SkyLight/Newsheathing.jpg" width="400" height="147" alt="New osb sheathing installed" title=""/>
 </figure>
 </div><!--align:center-->
What is the correct way?
0
Comment
Question by:isnoend2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39214939
Neither!
 <div style="text-align:center;margin-top:20px">
 <figure>
 <figcaption>Sheathing Replaced</figcaption>
 <img src="images/SkyLight/Newsheathing.jpg" width="400" height="147" alt="New osb sheathing installed" title=""/>
 </figure>
 </div><!--align:center-->

Open in new window

Adjust the margin-top as you like. But you shouldn't write css inline, you should use an external css file.
0
 

Author Closing Comment

by:isnoend2001
ID: 39214952
thanks thats what needed to know
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Css regex 6 52
Remove Space when printing webpage - Setup in Print.css 3 46
Javascript 2 53
TypeError jquery issues with site - CSS conflicts 3 46
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question