NOOB question of the month: HTML ?!?

3 replies

hello hello,

im modifying a template, i like to learn and DIY


<li style="background: url('http://placehold.it/1920x850') no-repeat center center">


In this code the background picture is hosted on the web, while I want to use a local photo I have in the html website folder


How I need to modify that string to do that ?

I tried with img src: etc etc but it messed up


Thanksssssssssssssss
#html #month #noob #question
  • Profile picture of the author Zenoth
    Assuming that your image is in a folder called "images" inside a parent folder and the file that contains this code is in the parent folder.

    <li style="background: url('images/image.jpg') no-repeat center center">
    However, it would be better to put css in a separate stylesheet.
    Then, you would do something like:
    HTML:

    <li class="li-with-bg">
    CSS:
    .li-with-bg {
    background:url("images/image.jpg") no-repeat center center;
    }
    {{ DiscussionBoard.errors[9650164].message }}
  • Profile picture of the author marcocalamassi
    thanks, got it!





    2nd noob question:

    in a template like this, in the contact page, how to change the location of the google map ?

    i searched the code and couldnt find any code related....is it in a different file ??

    Contact &ndash; Santorini
    {{ DiscussionBoard.errors[9659088].message }}
  • Profile picture of the author KirkMcD
    The code that controls the map is in js/scripts.js

    You code always read the api to figure it out.
    https://developers.google.com/maps/t...g-a-google-map
    {{ DiscussionBoard.errors[9659399].message }}

Trending Topics