Need currency pound symbol before amount calculation Programming Web Development by ianhaneybs I need to display a pound currency symbol before the amount that is calculated Below is the code I currently have <th class="text-right py-1 px-2 grand-total">0</th> function calc(){ var grand_total = 0; $('table#list tbody input[name="total[]"]').each(… Re: Need currency pound symbol before amount calculation Programming Web Development by Salem https://stackoverflow.com/questions/44969852/javascript-number-tolocalestring-currency-without-currency-sign Maybe use style 'currency' rather than style 'decimal' ? Re: Need currency pound symbol before amount calculation Programming Web Development by Dani Yes, but you might want to also add `currency: 'GBP'`, as so: $('table#list tfoot .grand-total').text(parseFloat(grand_total).toLocaleString('en-gb', { style:'currency', currency: 'GBP', maximumFractionDigit:2 })) Re: Need currency pound symbol before amount calculation Programming Web Development by Biiim Since Dani did the best standard-correct answer I will do the botch-job answer: $('table#list tfoot .grand-total').text('£'+parseFloat(grand_total).toLocaleString('en-gb', {style:'decimal',maximumFractionDigit:2})); $('[name="amount"]').val('£'+parseFloat(grand_total)); may also want to use &pound; to display in … Re: Need currency pound symbol before amount calculation Programming Web Development by gediminas.bukauskas.7 JS has a function for the formatting currencies. Read the 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat' article. You will find code samples there. Re: Need currency pound symbol before amount calculation Programming Web Development by gottaloveit [Currency.js](https://currency.js.org/) also works very well for this Screen resolution 1400 x 1050 px who has this? Digital Media UI / UX Design by Kraai Hi I have a client wanting a wordpress site with fixed background image and content scroll over it. My problem is, that my client has a 1400 x 1050 px screen, and I have no idea how this background I currently have on the site, would appear on their screen. I myself can only check up to 1240 x 1024 px on resolution. Up to what I can check, the bg … Re: Which one? em, pt, px, % Digital Media UI / UX Design by MidiMagic Answers: For browser and monitor screen resolution compatibility: - Use % to place objects on the page or set sizes on the page. - Use em for sizes and distances related to the text size rendered. - Use the relative text size names, or use a percentage of the base font, to set font sizes. - You can use % or em to resize an image, but it might lose… Re: CSS - em vs. px Digital Media UI / UX Design by almostbob an em has no direct relationship to a pixel, the relationship given so many times in old, very outdated, publications is based on a 96dpi crt monitor, current monitors 176dpi and higher, so there are a hell of a lot more px in the screen, and in an em an em is entirely a relative dimension, the size of the W or M in the current basefont, the … Re: css div width.. % or px ?? Digital Media UI / UX Design by mankis Sometimes it is better to use % sometimes px. For example. If you wish that your div has same width as page in browser than you will use %. If you wish that your div has same width as, for example, background image you have prepared for it than you will use px. Also if you have some small div that is inside of the bigger one and you wish that … Re: Screen resolution 1400 x 1050 px who has this? Digital Media UI / UX Design by Kraai Hi I actually found a nice online screen resolution tester yesterday, and it seems the bg image is ok on that site. It only starts to tile with a resolution of 1920 x 1200 px, and the tile does not look bad at all. So I am a happy chappie. Thanks for replying, I will mark this as solved. For those of you who want to test your work in different … Re: CSS - em vs. px Digital Media UI / UX Design by Frankey I always use pt when it is concerning fonts/text. pt is in my opinion the easiest to work with and the best compatible with all resolutions, also the mobile browser. In other words, the text remains readable with pt. IE supports em,%,px and pt. For divs i always use px because you don't want to have a messy layout in other resolutions, or you … bottom 20 px from "canvas" NOT screen - possible ? Digital Media UI / UX Design by AndyTT75 Hello to all Can anyone help me ? I'd like to create a box whose bottom is always 20 px from the bottom of the "canvas" (=the total area rendered by the browser). This is straightforward when the height of the canvas is less than the screen height But tricky when the canvas is taller than the screen-height. Is this … Which one? em, pt, px, % Digital Media UI / UX Design by veledrom Hi, What is the best out of "em, pt, px, %" to use for all browsers and platforms? e.g. pt is better for this purpose. em is better for this purpose. etc. Thanks CSS - em vs. px Digital Media UI / UX Design by kooia Hi everyone, I have the impression that Internet Explorer can only use EM's. I also have the impression that em's are normally 16 px, but can very in size. Is this true? Both ways, how do you define the size yourself? kooia Re: CSS - em vs. px Digital Media UI / UX Design by kooia So, am I getting you right that IE supports PX, but it's better to use % and EM's? Re: CSS - em vs. px Digital Media UI / UX Design by Kaycy Thank you for the clarification of the EM vs PX. I am learning that my way of creating web sites is so out dated! I will start using the EM's from now on. :) pixels(px) to percentage conversion Digital Media UI / UX Design by yopirates Hi ppl i have a doubt regarding pixel to percentage conversion in html.. i had designed a website using width and height in pixels but, when i change the screen resolution the alignment is changing so.. i need to convert all my (px) into respective percentage.. so tat the alignment is automatically adjusted Re: pixels(px) to percentage conversion Digital Media UI / UX Design by hielo [QUOTE]i had designed a website using width and height in pixels [/QUOTE] Not only that, but you also used a SPECIFIC resolution. Basically you need to make a copy of that page and on the new copy, working with the same resolution as before, start changing those px to percentages until your new design (using percentages) is as close as possible as … css div width.. % or px ?? Digital Media UI / UX Design by fuston05 Just curious as to which is better to use in css ... width % or width in px?? Are there any known browser compatibility issues that might prompt a preference between the two? Thank you in advance for you input. :) Re: css div width.. % or px ?? Digital Media UI / UX Design by AtomicPages It's a matter of preference really. Sometimes px is nice because you know the unit of measure and you don't necessarily need to make any calculations. Sometimes percentages are nice because it's generally a friendlier browser experience for "liquid" layouts. Large areas where you know you want the width to max out the parent element you … Re: CSS - em vs. px Digital Media UI / UX Design by adri_grace I started out using ems, but I've had several clients complain about how pixelated the fonts look on PCs. I tried px and that seems to help, but hasn't solved the problem entirely. Will % resolve this problem? Re: Screen resolution 1400 x 1050 px who has this? Digital Media UI / UX Design by Wraithmanilian What is the size of the image you are currently using as the background image? Re: Screen resolution 1400 x 1050 px who has this? Digital Media UI / UX Design by matricol give a big resolution and position it to top and center of the page Re: bottom 20 px from "canvas" NOT screen - possible ? Digital Media UI / UX Design by buddylee17 Yes. Use absolute positioning and set bottom attribute to 20px. [code=css] position:absolute; bottom:20px; [/code] Re: bottom 20 px from "canvas" NOT screen - possible ? Digital Media UI / UX Design by AndyTT75 In fact, that was my first appraoch - but it doesnt work Re: bottom 20 px from "canvas" NOT screen - possible ? Digital Media UI / UX Design by buddylee17 Validate the page with the [URL="http://validator.w3.org/"]W3C[/URL]. You could have an open element or an error causing this to not work. Just to see what it should do, create a blank html page and put only the following into the body of the document: [code=html] <div style="position:absolute; bottom:40px"> This div… Re: CSS - em vs. px Digital Media UI / UX Design by diafol Not true. You can set a 'standard size' for 1em = 10px by setting font-size: 62.5% in the css body element: [CODE]body { font-size: 62.5%; }[/CODE] So now you can set elements in em, knowing that: 1.2em = 12px; 1.6em = 16px, 2.8em = 28px etc etc. Re: CSS - em vs. px Digital Media UI / UX Design by almostbob its is better regardless of browser to use ems and %, the page will work and appear very similar in every standard compliant(1), and almost standard compliant browser(2) from Opera mini(1) and Blackberry(2) handheld devices to Opera(1) Firefox(1+++) all the LIinux browsers(1) and IE(miserable 2) If shrink the window from fullscreen to half, … Re: css div width.. % or px ?? Digital Media UI / UX Design by teedoff As far as I know, all browsers recognize percentages and pixels with no problem. I like to use percentages for page widths and such. If not, some users can have very bad experiences visiting your site.