logo
down
shadow

Line-height works differently on Mac and Windows


Line-height works differently on Mac and Windows

By : Mahmoud Ali
Date : November 24 2020, 05:44 AM
I hope this helps . If it is resolved by using a different font the issue is with the font, not with the CSS.
Font squirrel has an option under 'expert' where you can check 'Auto-Adjust Vertical Metrics' this might work for you.
code :


Share : facebook icon twitter icon
getResourceAsStream works differently on Mac OSX vs. Windows 7?

getResourceAsStream works differently on Mac OSX vs. Windows 7?


By : Jennifer Nieto
Date : March 29 2020, 07:55 AM
To fix this issue The separator in resource names is always '/'. File.separator varies from platform to platform (on UNIX variants it will generally be /, on Windows it will not).
Line height being represented differently on browsers

Line height being represented differently on browsers


By : Gokul Kanneganti
Date : March 29 2020, 07:55 AM
it should still fix some issue Did you try to use CSS reset. This makes sure that the size and spacing is always the same independent the browser. See more: About CSS Reset
Put it before all your CSS code:
code :
* {
   margin:0;
   padding:0;
   border: 0;
   list-style:none;
   vertical-align:baseline;
   line-height: 1;
}
SVG text line height displays differently within img tag

SVG text line height displays differently within img tag


By : Jeff King
Date : March 29 2020, 07:55 AM
will be helpful for those in need If you want a to function correctly, you need to include a element.
Note: I've removed the image from this demo to make it smaller.
code :
<img src="http://elbrus.ecommercesuite.co.uk/Customisation Tool/SVG Templates/Bookmark.svg" />


<svg
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   width="73mm"
   height="150mm"
   viewBox="0 0 73 150"
   version="1.1"
   id="svg4523">
  <g
     id="layer1"
     transform="translate(0,-147)">

      <foreignObject
       x="15"
       y="150"
       width="40"
       height="60">
       <body>
         <p id="credit-card-text" style="font-size: 4px;text-align:center;text-anchor:middle;fill-opacity:1;font-weight:bold;line-height: 1;">Customise with your own message here.</p>
       </body>
    </foreignObject>
  </g>
</svg>
Why textarea and input text with same font-size, line-height, padding and height are vertically aligned differently?

Why textarea and input text with same font-size, line-height, padding and height are vertically aligned differently?


By : Elease Mash
Date : March 29 2020, 07:55 AM
I wish did fix the issue. You can remove line height on your input since it has no effect on it.
Beside you should have the same line height as height for your textarea to reproduce the same effect than the input.
code :
.myTextarea {
  display: block;
  font-family: Arial;
  font-size: 14px;
  line-height: 32px;
  height: 32px;
  padding: 2px 5px;

  resize: none;
}

.myInput {
  display: block;
  font-family: Arial;
  font-size: 14px;
  height: 32px;
  padding: 2px 5px;
}

.myDiv {
  margin-top: 20px;
  margin-bottom: 5px;
  font-weight: bold;
}
<div>
  <div class="myDiv">Textarea</div>
  <textarea class="myTextarea" rows="1">12345</textarea>
  <div class="myDiv">Input</div>
  <input class="myInput" type="text" value="12345"/>
</div>
Why is the same line-height rendered differently in two different Chrome versions?

Why is the same line-height rendered differently in two different Chrome versions?


By : user3208337
Date : March 29 2020, 07:55 AM
To fix this issue You may try to rely on the flex model here :
a few examples that you might test on your mobiles:
code :
.button {
  height: 44px;
  background-color: #FF0000;
 /* display: block; */
  margin-top: 20px;
  margin-left: 20px;
  margin-right: 20px;
  border-radius: 5px;
  border-top: none !important;
  /*line-height: 42px !important;*/
}

/* TEST  UPDATE */
.button {
  display: flex;
  align-items:center;
  
  
/* demo purpose */  
  /* to show middle */
    background-image:linear-gradient(to top, transparent 50%, rgba(0,0,0,0.2) 50%);
}
.fz2 {font-size:2em;}
.fmthm {font-family:verdana;}
<div class="button">Text</div>

<div class="button fz2">Text</div>

<div class="button fmthm fz2">TEXT</div>
Related Posts Related Posts :
  • Adding a drop down transition to CSS Menu
  • CSS Media Queries not kicking in when there supposed to
  • Video JS - poster image cover/contain
  • center the div absolute using css but i cannot figure out why its not moving to centre
  • simple css code, i dont understand
  • Autoformatting LESS code with vim
  • Can we use different CSS language/pre processors for different components in a Angular Project
  • combined multiple classes into one css rule
  • Detect mobile device browsers, not only screen width
  • CSS folded corners of div with shadow
  • bootstrap 3: why do my <div>s stack from 992 px width onwards when using "col-sm-6"
  • IE7, IE8 support for css3 media query
  • Gradient ends are blurry when using pixel measurements
  • display bootstrap popovers outside divs with overflow:hidden
  • How to make a non responsive site by using Bootstrap?
  • Selecting an element that doesn't have a child with a certain class
  • Embedded Twitter Widget Height issue
  • Twitter Bootstrap - How to get buttons to be block level only on extra small and small devices
  • How can I add a vertical scrollbar to my div automatically?
  • Trouble changing the link font color using typography.js in gatsby
  • Nesting up scss with main.scss and subcomponent scss files
  • Why does my FontSquirrel font not work?
  • Div positioning (overlays when not wanted)
  • Align button vertically in alert field
  • CSS: display: flex and text ellipsis on the same element
  • Fixed position buttons appearing in incorrect area depending on browser
  • CSS-menu issue in angular project
  • Responsive Website - general enquiries
  • Webkit Scrollbar Buttons only showing horizontal
  • explicitly set a field's width in css to "no-auto"
  • Jekyll accessing page variables from CSS
  • Why did my #wrapDesktopNavBar disappear on desktop view?
  • CSS Menu Multiple Hover Colo(u)rs
  • Resizing an image at will with CSS?
  • CSS Naming Best Practice in MVC Layouts
  • FireFox & Chrome CSS Differs
  • Gradient Border Causing the Border to Disappear
  • How to hide column label on google chart
  • How to change H3 color in bootstrap using CSS file
  • CSS How to align checkbox image
  • css3 jagged edge on left isntead of right
  • display text in a horizontal line , using ng-repeat and bootstrap
  • Css right top corner
  • Bootstrap keep button other border gradient when removing border-left
  • Getting divs in the right postion
  • Rails 4: Sass raises SyntaxError when precompiling assets on server but not on development computer
  • Boostrap css file overrode my css file
  • Why are placeholder selectors inside @keyframes valid .scss?
  • Create a 4x4 responsive grid of squares with a margin of 20px on each side of the container?
  • CSS Not Selector: Select All Except Inside of Element
  • CSS Intellisense for files not in solution
  • Overlapping Anchor Tags When Hovering Over One
  • Any way to keep Susy from changing font-size automatically?
  • In Chrome’s user agent stylesheet, why use "-webkit-margin-before" et al instead of just "margin-top"
  • Responsive slanted border
  • SCSS variables - same name, different value in different media breakpoints
  • How to create overlay over div without defining it in HTML
  • Using negative values fails the execution in SASS
  • up/down arrow key issue with typeahead control (angular bootstrap UI)
  • increase size of search terms in a magento site by applying css class-name
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org