Solved

Space(10) instead of " " 10 times?

Posted on 2007-11-28
10
1,356 Views
Last Modified: 2008-02-01
Is there a Space tag in HTML?  I want to make 10 spaces.  Do I really need to code:
          ?
0
Comment
Question by:LeahTheMack
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20364638
Yes, unfortunately you will have to, as if you just put white spaces then the browsers will display them as one. No other options buddy.
0
 
LVL 11

Expert Comment

by:Sven
ID: 20364914
Maybe you can use tables or you can use a <span> and format it via css to the width you want?
0
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 50 total points
ID: 20364947
Why not add the spacing to whatever you have after the spacing? Like:

margin-left: 80px;

or

padding-left: 80px;
0
 
LVL 11

Assisted Solution

by:Sven
Sven earned 50 total points
ID: 20364964
This is what I said:
<span style="margin-left: 80px;">Your text here!</span>
 

<span style="width: 80px;">&nbsp;</span>Your text here!

Open in new window

0
 
LVL 29

Expert Comment

by:Göran Andersson
ID: 20364984
No, DarthSonic, you only mentioned the second method, I suggested the first method as an alternative.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:LeahTheMack
ID: 20365161
If I set the span to 80px here, will that goof up other lines on the page (above or below)?
Will that force me to set the span everywhere else to compensate?
0
 
LVL 11

Expert Comment

by:Sven
ID: 20365174
The span-Tag is an inline element which will only affect the space you defined and the text before and after will not be affected and there will be no break before and after. Try it and see what happens!
0
 
LVL 11

Expert Comment

by:Sven
ID: 20365184
Here you will find an example and a description of the span-tag:
http://www.w3schools.com/tags/tag_span.asp
0
 
LVL 29

Expert Comment

by:Göran Andersson
ID: 20365215
That depends on how your layout is working. The style applies only to the element where you apply it, but the extra space may affect other elements, just as a lot of &nbsp;s would.

Applying width on an inline tag like a span doesn't have any effect at all, by the way. (Internet Explorer may be applying the width in some settings, but this is a rendering error and should definitely not be used.)
0
 

Author Comment

by:LeahTheMack
ID: 20365347
Ok, thanks.  Doubling points to split between GreenGhost and DarthSonic
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ajax control editor 4 61
Library to convert HTML to PDF. 8 55
WordPress Themes 10 34
Alignment is not working correctly. 8 32
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

911 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