Git Product home page Git Product logo

Comments (3)

SuperSimpleDev avatar SuperSimpleDev commented on August 21, 2024

Oh no, looks like I forgot to add DOCTYPE html to many of the solutions.
Thanks for finding this! I didn't know there was a subtle difference.

For some reason if you set:

display: block;

On the image the extra space will disappear (images by default are display: inline-block;)

display: inline-block; tends to have alignment issues since it's meant to represent objects like buttons or images inside a line of text so inline-block elements will add some extra space around them as if they are inside a line of text.

It must have changed in HTML 5 to always add this extra space, although I'm not exactly sure how it works 🤷‍♂️
I'll update the solutions though

from html-css-course-2022.

dnhes avatar dnhes commented on August 21, 2024
<title>Exercis2</title> <style> .request-button{ background-color: black; color: white; height: 40px; width: 120px; cursor: pointer; } .addtocart-button{ background-color:rgb(255, 216,20); color:black; height: 35px; width: 155px; border-radius: 25px; cursor: pointer; border-width: 0px; font-size:solid; font-weight:small; transition: 0.20s; } .addtocart-button:hover{ background-color:rgb(192, 194, 105); opacity: 0.5; } .addtocart-button:active{ opacity: 0.8; } .signup-button{ background-color: rgb(46, 164, 79); color: white; height: 35px; width:90px; border-style: hidden; border-radius: 5px; cursor: pointer; } </style>
Request now
    <button class="addtocart-button">
        Add to Cart
    </button>

    <button class="signup-button">
        Sign up
    </button>
</div>

from html-css-course-2022.

dnhes avatar dnhes commented on August 21, 2024

hir sir..can u please check my codes .. ty

from html-css-course-2022.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.