Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Text tagged "p" and "li"

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26154
    McCss
    Member

    Hi again.. new issue.. I hope it will be simple to correct this time..

    This is the fact: I have a simple html text tagged <p> but in the middle of this text I have an <li> ok?
    After this <li> I need to go on with the normal html text but this second part of the text goes sooo down to the page… don’t know why, I’m gonna paste the code:

    Code:
    #div_name p{

    font-family: Arial,”Times New Roman”,Times,serif;
    font-weight: normal;
    font-size: 0.900em;
    color: white;
    text-align: left;
    margin-top: 20%;
    padding-left: 25%;

    }

    #div_name li{

    font-family: Arial,”Times New Roman”,Times,serif;
    font-weight: normal;
    font-size: 0.900em;
    color: white;
    text-align: left;
    margin-left: 220px;
    padding-right: 30px;

    }

    #div_name span{
    color: #9cd5f0;
    }

    span#sec_par{
    color: #9cd5f0;
    margin-left: 180px;

    }

    Code:

    TEXTTEXTTEXT

    little text

  • TEXT

Thanks!!

#64309
TheDoc
Member

Remember to wrap your list items (li) in either an ordered list (ol, numbers) or an unordered list (ul, bullets). So:

<ul>
<li>Item1</li>
<li>item2</li>
<li>etc…</li>
</ul>

#64310
McCss
Member

Hi TheDoc thx but the problem is that the second part of the text, after the <ul> etc… goes down the page.. as it has got a big margin on it… just wondering why… this second part goes over the image.. over the div…

#64314
TheDoc
Member

This is why:

#div_name p {
margin-top: 20%;
}

#64318
McCss
Member

I need to give an id to the sec <p> .. ow ca I do it? I know this is the basic of css…

Because if I delete that { margin-top: 20$ } all the text rises up, but if I try to put it down again then the sec part of the text, also tagged <p> after the <ul> <li> go down too but for its own… adding a margin more.. do you know what I mean..

— I need to move the text as a unique block of text.. that’s it..

#64325
TheDoc
Member

Instead of add margin to the <p>, you should add padding-top to the div.

#64348
FAQPAL
Member

Why are you using the li tag, just use span id="something" and then in your CSS file, add:

.something {
styleing here
}

The li tag is for lists.

Viewing 7 posts - 1 through 7 (of 7 total)