Solved

Trying to indent some text

Posted on 2013-05-21
10
311 Views
Last Modified: 2013-05-21
On this page:
http://roofgenius.com/test2.asp
I am trying to get these 3 lines of text moved to the right 20px;
Legend Cost:
Low = 1
High = 10
My last attempt:
<p class="Bfont12" style="margin-left:20px;"></br>
<span style="display:block;">Legend</span>
Cost: Low = 1<br />
High = 10
</p>
How can i do this ?
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
10 Comments
 
LVL 8

Assisted Solution

by:Adrian Crabtree
Adrian Crabtree earned 167 total points
ID: 39184720
Are you trying to line it up with the table? It is moved over 20px, but if you want it to line up you need to set margin-left to 70px.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 167 total points
ID: 39184807
Instead of trying to move the box around with margin; the correct approach is to use padding-left to position inside the box.

Setting display:block on a span is totally illogical.  div is the same as a block span; however just using another br will do the trick. Or use a pre tag and it will respect the linefeeds from the editor without the need for br.

Cd&
0
 
LVL 6

Assisted Solution

by:APoPhySpt
APoPhySpt earned 166 total points
ID: 39184818
well first of all as 'acrab' said with you current html set up you need to give it way more margin than you are giving it now. this said, you should consider improving your html, as it will become inscrisingly dificult to mantain that code when there are divs overlapped, like when a div starts behind another one, resulting in that you are giving the div a margin that is not yet visible.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39184826
<p class="Bfont12" style="padding-left:20px;">
<pre>
Legend
Cost: Low = 1
High = 10
</pre></p>


Cd&
0
 

Author Closing Comment

by:isnoend2001
ID: 39184877
Thanks everyone
0
 

Author Comment

by:isnoend2001
ID: 39185153
I have tried all the solutions to no avail
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39185352
You have a p tag nested inside a p tag... that is invalid and breaks the structure.

<p class="Bfont12" style="padding-left:70px;">
<p>
Legend Cost:<br />
 Low = 1<br />
High = 10
</p>
</p>

should be:
<p class="Bfont12" style="padding-left:70px;">
Legend Cost:<br />
 Low = 1<br />
High = 10
</p>


Cd&
0
 

Author Comment

by:isnoend2001
ID: 39185382
Made no difference
0
 

Author Comment

by:isnoend2001
ID: 39185413
Probably not the best way,but this works:
<br />
<p style="padding-left:200px;">
<span class="Bfont12">Legend Cost:</span><br />
 Low = 1<br />
High = 10
</p>

http://roofgenius.com/test.asp
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39185419
It looks fine in FF, Chrome and IE10.  A bit messy in compatibility mode; but that is to be expected.

Cd&
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to delete "dots" above Bootstrap 3 navbar 4 128
Easy css question moving title underneath an image 4 44
White space in figure / img 4 35
bootstrap css color change 10 49
Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 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