Forum Moderators: open
I use div tag for text-indent
<div style = 'padding-left: 15px; text-indent: -15px>
this is instead of ul tag
but
div tag is make a new line
so I use span tag like this
<span style = 'padding-left: 15px; text-indent: -15px>
but It's not work
div tag is good
but my program change \n to <br />
so when I use div like this
<div style = 'padding-left: 15px; text-indent: -15px>blah1</div>\n
<div style = 'padding-left: 15px; text-indent: -15px>blah2</div>\n
output :
blah1
blah2
div change new Line and \n change <br/>
How can I solve my problem
Please Help me
The text-indent property applies only to certain types of elements: block-level elements, table cells and inline blocks. See [w3.org...]
But the span element is an inline element, and not a block-level element -- so it doesn't work, as you've discovered. Because div is a block-level element, text-ident will work there.
The new line problem seems to be somethig you wrestle with in just your program -- it is not something in html itself. It makes sense to me to replace new lines with a break tag -- whatever you are hoping will happen may require you to do some conversion to the file before you creat the html.