Hi all,
On a web page I have a text line. Directly underneath this line I want a text block, indented and italic. An example is here: www.pc3.nl/test/example.doc (from 10.00 to 22.00 MET). I would like to achieve this by CSS. I have tried 2 ways: by using the <ul> tag or the <div> tag. In both cases I use a separate style sheet.
I have used:
<div class="test">text block</div>
In style sheet:
.test { float: right; margin-left: 20px; font-style: italic; }
or:
<ul>text block</ul>
In style sheet:
ul { font-style: italic; }
It works both ways, but in either case I have a white space between the text line and the indented text block. How can I achieve this without the white space? I want the text line directly followed by the text block.
Thanks in advance for your help.
Rgs,
Fokke Nauta
//mod edit: Source code should be wrapped in bbcode tags, i.e. [code]...[/code]. Fixed. ~gt
I have seen that some tags I
I have seen that some tags I put in my post have dissappeared.
This is the text I used. Hope this will work. I left out the tag brackets.
I have tried 2 ways: by using the div tag or the ul tag. In both cases I use a separate style sheet.
I have used:
div class="test" text block /div
In style sheet:
.test {
float: right;
margin-left: 20px;
font-style: italic;
}
or:
ul text block /ul
In style sheet:
ul {
font-style: italic;
}
using margins
html:
<p> example this is a line of text in its own paragraph</p> <p class="inny"> some finny text</p>
css:
.inny { font-style:italic; margin-left:5em; margin-top:-1em; }
http://jsfiddle.net/offk3L5y/