Skip to main content

Posts

CSS by research

how to center elements inside container using text-align:center in css The `text-align: center;` property in CSS is primarily used to horizontally center inline or inline-block elements within their parent container. If you want to center block-level elements, you'd typically use other methods like margin auto, flexbox, or grid. Here's how you can use `text-align: center;` to horizontally center inline or inline-block elements: ### Example with `text-align: center;`: ```html <div class="container">     <p class="centered-element">This is a centered element.</p> </div> ``` ```css .container {     text-align: center; } .centered-element {     display: inline-block;     /* Other styling if needed */ } ``` In this example, the `text-align: center;` is applied to the `.container`, and the `.centered-element` is set to `display: inline-block;`. This makes the paragraph centered within its parent container. Keep in mind that `text...
Recent posts

JS research

simplify it let gameOver= false; when should i use this in simple terms  In simple terms, `let gameOver = false;` is like telling your program that the game is not over yet. You use this when you want to keep track of whether the game is still being played or if it has finished.  For example, imagine you're writing code for a video game. At the start, you'd set `gameOver` to `false` because, well, the game hasn't ended yet. As the game progresses, if certain conditions are met (like a player winning or losing), you might change `gameOver` to `true` to signal that the game is finished. So, `let gameOver = false;` is a way to let your program know the initial state of the game, and you'll change it later on when the game comes to an end. make me understand this js code in simple terms let boxText = ['Apple', 'Banana', 'Cherry', 'Date', 'Fig']; let e = [2, 4]; let boxText = ['Apple', 'Banana', 'Cherry', '...

SQL from beginning to advance

 why not use excel over SQL? application of Excel-; small amount of data one time analysis  quick chart/ graph untrained person applications of SQL-; large amount of data store real time data from websites/ apps easily combine with different datasets automate steps and can re-use easy and safe access data integrity deep search capabilities

web development by research

 CSS color vs. background-color vs. background  Quick answer Color = Text Color Background-color = the color of the background Background = gives you the posibillity to set color, image , etc.. It's a shorthand properties of CSS.   Size units in CSS %= relative to parent vw, vh= absolute, not dependant  px= absoulute  em= relative to parent rem= relative to root element, HTML Margin;auto; properties in css The margin: auto; property in CSS is used to center an element horizontally within its parent container. It sets the left and right margins of the element to automatically adjust and distribute the available space equally on both sides. Here's a breakdown of how it works: Horizontal centering: When you apply margin: auto; to an element, it will calculate the left and right margins to make the element centered horizontally within its parent container. Available space: The element needs to have a specified width for margin: auto; to work correctly. I...