Search code examples
svgresponsivecenter

how to make a header responsive and keep svg at center?


Hi all I already have it looking centered and responsive but I am not sure if there is anything else I can do to make it even better I have this structure:

div
   div
      svg

the first div has

width 100%

second has

display flex 
align items center

then for the svg I have it's size:

svg[Attributes Style] {
    width: 85;
    height: 21;
}

What else can I do? I am testing it in various screens but I haven't found issues yet.


Solution

  • Try this

    div div { ## this is the second <div> tag
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
    }
    

    and svg {text-align: center;}