Forums

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

Home Forums CSS CSS Spacer for li

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #45752
    Smir
    Participant

    I’m totally new to coding, and i just try my best. what im trying to do is get a spacer after every `

  • ` without manually having to add it, if not and i can only manually add it then a spacer only using CSS, but that looks clean and clear?

    Hope someone can help.
    Many thanks

#139909
Paulie_D
Member

What do you mean by a spacer?

Do you mean margin left/right or top/bottom.

An image or border?

Can you show us a picture of what you are trying to do?

#139910
Smir
Participant

i would like a kind of image, but preferable something that is made up by CSS if you get what i mean? i want the keep the minimal feel of everything.

just a grey/faded line of some sort?

#139911
Smir
Participant
#139914
Paulie_D
Member

Just use border-bottom and style it how you want.

http://codepen.io/Paulie-D/pen/Hecpv

If you want extra actual ‘space’ between specific list items or a divider of some kind then that’s a little more.

#139922
Smir
Participant

that’s something exactly like i wanted i wasn’t sure what types of lines would be in CSS :)

how would i go about making text section that would auto fit in a certain width that i choose? would be grateful for any help

#139936
Paulie_D
Member

Text will automatically wrap inside an element with defined width.

#140038
Smir
Participant

how do i do that exactly?

#140039
ScottMarshall
Participant

give what ever your putting the text in a width could be pixels, percentage, ems.

#140041
posterity576
Participant

@Paulie_D is right about using border-bottom. As far as actual spacing is concerned, keep in mind that every element on a web page is a box. That said, each li you use is its own box, and so if you want to move one li from another one, i.e., one box from another box, you simply use margin. To specify a margin is to say that you want to add space between one element and another. On the other hand, to say you want to add space _within_ an element, you specify padding.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.