Relative Content

Tag Archive for javascripthtmlcssreactjs

Positioning share part full width on mobile, and different on desktop

i was trying to position my share div in the full width of one of its sibling (person), the share div is a div that only shows when the button is clicked. this is my live version, if you click the share button you should see whats wrong. ill show you a link of how i want it to be aswell. + my code. This is my live version: https://article-preview-component-master-tvzx.vercel.app/ , this is my github: https://github.com/gajbos99/article-preview-component-master/tree/main/article , and at last how i want it to look like: https://oaved.github.io/article-preview-component/ , just starting out with css, if you have any tips/feedback please let me know

date input issue when adding max and min properties

<input type=”date” id=”chooseDate” name=”chooseDate” value={selectedDate} onChange={(e) => handleScheduleDate(e.target.value, assessorId, true) } disabled={assessorId ? false : true} class=”form-control font12″ min={moment(new Date()).format(“YYYY-MM-DD”)} max={moment(new Date(disableMaxDays)).format( “YYYY-MM-DD” )} placeholder=”YYYY-MM-DD” /> Initially, the date format issue displayed as “dd-06-2024”. After commenting out the min and max, it displayed as “dd-mm-yyyy.your text Thank you in advance javascript html css reactjs

scrollTop value after assigning an integer becomes floating in mobile browser and integer in desktop

let currentScrollTop = Math.round(scrollableDiv.scrollTop); let lineHeightInt = Math.round(lineHeight); console.log(currentScrollTop+lineHeightInt) scrollableDiv.scrollTop = Math.round(currentScrollTop + lineHeightInt); console.log(scrollableDiv.scrollTop, lineHeightInt); logging the currentScrollTop+lineHeightInt gives 56 but logging the scrollableDiv.scrollTop after assigning currentScrollTop+lineHeightInt gives 55.76309585571 in mobile browser. I want it to be same as desktop as 56. javascript html css reactjs New contributor Aman is a new contributor to […]