html - Margin 0 auto to a span within div not working -


I call a span within a div, takes its margin but margin: 0 auto is not working anybody Also suggest?

html

  & lt; Div & gt; & Lt; Period & gt; & Lt; H3 & gt; Paris Eurostar Breaks & lt; / H3 & gt; & Lt; P & gt; Curitur Fingilla Maurice Interdham Nek Magna & lt; / P & gt; & Lt; / Span & gt; & Lt; / Div & gt;  

CSS

  div {width: 465px; Minute-height: 201px; } Div span {display: inline-block; Color: #fff; Border Bottom: 1 Px # FFF Solid; Border-top: 1px #fff concrete; Margin: 0 auto; }  

Output Required

Image details here

with center horizontal The code> margin element should have a fixed width .

Since you are using inline-block try this:

  div {text-align: center; }  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -