Skip to content

Newbie questions about images and css links #40642

Answered by VyvaHart
dafaher asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @dafaher

  1. You don't need both Bootstrap CSS links. Pick one
    I suggest to choose this one:
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">

  1. Keep your custom CSS in main.css instead of messing with bootstrap.min.css. This keeps things clean and easier to update: <link rel="stylesheet" href="./css/main.css">

  1. img-fluid makes images responsive but doesn't optimize them for different devices. Use srcset to serve different image sizes based on screen size:
    <img src="image-small.jpg" srcset="image-small.jpg 600w, image-medium.j…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dafaher
Comment options

@VyvaHart
Comment options

@dafaher
Comment options

Answer selected by dafaher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants