1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Is it possible to center a submit button without putting it into a div box

Discussion in 'CSS' started by ketting00, Feb 17, 2016.

  1. #1
    ketting00, Feb 17, 2016 IP
    SEMrush
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,630
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    
    input[type=submit] {
      display:block;
      margin: 0 auto;
    }
    
    Code (markup):
    However, it will only work if you only have one button (or else it will put them on separate lines)
     
    PoPSiCLe, Feb 17, 2016 IP
  3. ketting00

    ketting00 Well-Known Member

    Messages:
    727
    Likes Received:
    20
    Best Answers:
    3
    Trophy Points:
    118
    #3
    Thanks @PoPSiCLe,

    That should do it. I think it'd be better than creating more divs.
     
    ketting00, Feb 17, 2016 IP