Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by SMSteven

  1. S

    Python How to import and use a module from another Python program online?

    Hi All I'm learning Python. I have created a typical sample module online (specifically on repl.it): # Python Module example def add(a, b): """ This program adds two numbers and returns the result. """ return a + b Here, the module file name is example.py, the module is named...
  2. S

    HTML & CSS Why does an <img> within a <div> display a narrow gap at the bottom?

    OK, I've found a good solution to this problem. It seems it's a well-known problem. Here's the solution.
  3. S

    HTML & CSS Why does an <img> within a <div> display a narrow gap at the bottom?

    Hi All I have placed an <img> within a <div>. Here's the HTML: <div class="box"> <img class="height200" src="https://picsum.photos/200/200?random=1"> </div> Here's the CSS: .box { display: inline-block; margin: 20px...
  4. S

    HTML & CSS Why does an image break its layout if the image is not found?

    "viz." or ("viz" without the fullstop) is an expression meaning "namely". Check: viz.
  5. S

    HTML & CSS Why does an image break its layout if the image is not found?

    Here's the (partial) code for such a <div>: <div id="cardMkt"> </div> #cardMkt { width: 200px; height: 300px; background: url('Marketing.jpg') no-repeat center / cover; }
  6. S

    HTML & CSS Why does an image break its layout if the image is not found?

    Yes, Tealk. You are right. This is a browser issue. I have tested the page on lambdatest and find that it fails on every (major) browser except Safari. For the time being I am going to use the solution already in hand - viz, a <div> with a background-image.
  7. S

    Hi All

    Hello Thanks for the replies and the welcome. Replying to Malcom's queries: 1) While searching for cross-platform technologies, I realized that web technologies served the purpose. Hence my interest in the same. 2) I discovered codeforum by searching on google for "CSS Forums". Steven
  8. S

    HTML & CSS Why does an image break its layout if the image is not found?

    Sorry for the inconvenience. I have now uploaded it as a JPG. Steven
  9. S

    HTML & CSS Why does an image break its layout if the image is not found?

    Hello, Thanks for the reply. I have attached a PDF screenshot of the broken layout as it appears on Firefox. On Chrome too, the broken layout is similar to that in the attachment. As you can see, the 2 cards are displayed in 2 rows one below the other. Both the Firefox and Chrome versions...
  10. S

    HTML & CSS Why does an image break its layout if the image is not found?

    I am displaying a box (.box class) within which 2 cards (.card class) are present. The requirements are as follows: 1) The box has the same height as the cards. 2) The cards are required to be displayed at the extreme left and right ends of the box, on the same row. Within each .card object...
  11. S

    Hi All

    Hi I'm new here. Just saying hello. I'm a Software professional. I am interested in web technologies: HTML, CSS, JS, PHP, Python. Also interested in DB technologies. Steven
Back
Top Bottom