Forums

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

Home Forums CSS padding for span

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #45787
    designer
    Member

    I want to add the 10px padding on the span’s text. my text is like goes an dnkan dfknakdnfk nadkfn akdnfkn ad andk nfkandkfn akdn fnakdnf akdnfk adkfn kanak d

    I need the text background only not the whole background

    #140055
    Kitty Giraudel
    Participant

    Okay. Do so?

    #140058

    Give us a better example on what you want to do.

    #140062
    Nishant
    Participant

    I think you want to do something like [this](http://codepen.io/anon/pen/grJth “”).

    if so, then apply following code to span.

    margin: 0 10px; background:SOMETHING_YOU_LIKE; line-height:FONT-SIZE+20px;

    Or something like [this](http://codepen.io/anon/pen/bgrCi).

    #140063
    bablucolno
    Participant

    Hi

    @bhaktanishant

    margin: 0 10px; background:SOMETHING_YOU_LIKE; line-height:FONT-SIZE+20px;
    this is right but you forgot width and float ?

    #140065
    Sarfaraj
    Participant

    bhaktanishant is right and @bablucolno I think float and width not important in this case.

    #140078
    Nishant
    Participant

    [@bablucolno](https://css-tricks.com/forums/profile/45802/bablucolno “”) This is span text and there is no need of width and float.

    #140080
    bablucolno
    Participant

    ok i agree with Sarfaraj and bhaktanishant but i have some confusion in span background designer want text background bg color what we do without width and float ??

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