Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #581931

    on https://kriesi.at/support/topic/svg-logo-not-aligning-left/
    it is closed but i think this is an important notice to that thematic.

    if you open a svg file with a good text editor (on Mac f.e. sublime text on PC notepad++) you can see on top of the svg something like this:

    <?xml version="1.0" encoding="utf-8"?>
    <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
    	 viewBox="0 0 500 125.9" style="enable-background:new 0 0 500 125.9;"   xml:space="preserve">
    <style type="text/css"> …

    a rule: preserveAspectRatio=”xMinYMin meet” i often inserted by myself just in front of the xml:space=”preserve”
    This manages how the svg act in a responsive case.
    three options you have Min, Mid, Max
    if you choose xMinYMin the svg goes to the left side and top when shrinking.
    xMidYMid means that the svg stayes in the center of his container etc pp.

    <?xml version="1.0" encoding="utf-8"?>
    <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
    	 viewBox="0 0 500 125.9" style="enable-background:new 0 0 500 125.9;"  preserveAspectRatio="xMinYMin meet"  xml:space="preserve">
    <style type="text/css"> …
    • This topic was modified 8 years, 10 months ago by Guenni007.
    #582829

    Hey Guenter!

    Thank you for staying in the forum!

    I’m not familiar with svg and how it works so this is good to know. Thanks for sharing! :)

    Regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.