Solved

The correct way to create some space.

Posted on 2013-06-02
2
324 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
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now