change background -image whit html and css
up vote
1
down vote
favorite
I want to put this image as a background under the div in which appears the writing G.E.D S.A.L.C
but it does not work .. although I have tried with CSS and even forcing it all with this:
<body bgcolor="blue" background="images/sfondo.png">
THIS IS THE CODE :
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("images/sfondo.png");
min-height: 100%;
}
</style>
</head>
<body bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
and this is the image ... BackGround IMAGE
the photo is placed in the right url
Does anyone know how to help me?
PS .. I admit that I have used a template
ahahaha
javascript html css image background-image
|
show 1 more comment
up vote
1
down vote
favorite
I want to put this image as a background under the div in which appears the writing G.E.D S.A.L.C
but it does not work .. although I have tried with CSS and even forcing it all with this:
<body bgcolor="blue" background="images/sfondo.png">
THIS IS THE CODE :
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("images/sfondo.png");
min-height: 100%;
}
</style>
</head>
<body bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
and this is the image ... BackGround IMAGE
the photo is placed in the right url
Does anyone know how to help me?
PS .. I admit that I have used a template
ahahaha
javascript html css image background-image
So where exactly is the element that the selector.bgimg-1
is supposed to match then …?
– misorude
Nov 20 at 13:57
i can't understand ..where i must put this selector ? @misorude
– AlexLogic
Nov 20 at 13:59
so i just paste url of the img into body<body bgcolor="blue" background="https://i.stack.imgur.com/TYX0B.png">
and all seems fine
– Smollet777
Nov 20 at 14:01
1
Could be that it is just a mismatch on the image path. Can you confirm the image is actually loaded on request or if it hits 404? You can do so by Accessingdeveloper tools
, under theNetwork
tab and refreshing your request
– Diogo Santo
Nov 20 at 14:06
with the link it works but with the address of the folders, it does not work @Smollet777
– AlexLogic
Nov 20 at 14:06
|
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to put this image as a background under the div in which appears the writing G.E.D S.A.L.C
but it does not work .. although I have tried with CSS and even forcing it all with this:
<body bgcolor="blue" background="images/sfondo.png">
THIS IS THE CODE :
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("images/sfondo.png");
min-height: 100%;
}
</style>
</head>
<body bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
and this is the image ... BackGround IMAGE
the photo is placed in the right url
Does anyone know how to help me?
PS .. I admit that I have used a template
ahahaha
javascript html css image background-image
I want to put this image as a background under the div in which appears the writing G.E.D S.A.L.C
but it does not work .. although I have tried with CSS and even forcing it all with this:
<body bgcolor="blue" background="images/sfondo.png">
THIS IS THE CODE :
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("images/sfondo.png");
min-height: 100%;
}
</style>
</head>
<body bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
and this is the image ... BackGround IMAGE
the photo is placed in the right url
Does anyone know how to help me?
PS .. I admit that I have used a template
ahahaha
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("images/sfondo.png");
min-height: 100%;
}
</style>
</head>
<body bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("images/sfondo.png");
min-height: 100%;
}
</style>
</head>
<body bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
javascript html css image background-image
javascript html css image background-image
asked Nov 20 at 13:54
AlexLogic
457
457
So where exactly is the element that the selector.bgimg-1
is supposed to match then …?
– misorude
Nov 20 at 13:57
i can't understand ..where i must put this selector ? @misorude
– AlexLogic
Nov 20 at 13:59
so i just paste url of the img into body<body bgcolor="blue" background="https://i.stack.imgur.com/TYX0B.png">
and all seems fine
– Smollet777
Nov 20 at 14:01
1
Could be that it is just a mismatch on the image path. Can you confirm the image is actually loaded on request or if it hits 404? You can do so by Accessingdeveloper tools
, under theNetwork
tab and refreshing your request
– Diogo Santo
Nov 20 at 14:06
with the link it works but with the address of the folders, it does not work @Smollet777
– AlexLogic
Nov 20 at 14:06
|
show 1 more comment
So where exactly is the element that the selector.bgimg-1
is supposed to match then …?
– misorude
Nov 20 at 13:57
i can't understand ..where i must put this selector ? @misorude
– AlexLogic
Nov 20 at 13:59
so i just paste url of the img into body<body bgcolor="blue" background="https://i.stack.imgur.com/TYX0B.png">
and all seems fine
– Smollet777
Nov 20 at 14:01
1
Could be that it is just a mismatch on the image path. Can you confirm the image is actually loaded on request or if it hits 404? You can do so by Accessingdeveloper tools
, under theNetwork
tab and refreshing your request
– Diogo Santo
Nov 20 at 14:06
with the link it works but with the address of the folders, it does not work @Smollet777
– AlexLogic
Nov 20 at 14:06
So where exactly is the element that the selector
.bgimg-1
is supposed to match then …?– misorude
Nov 20 at 13:57
So where exactly is the element that the selector
.bgimg-1
is supposed to match then …?– misorude
Nov 20 at 13:57
i can't understand ..where i must put this selector ? @misorude
– AlexLogic
Nov 20 at 13:59
i can't understand ..where i must put this selector ? @misorude
– AlexLogic
Nov 20 at 13:59
so i just paste url of the img into body
<body bgcolor="blue" background="https://i.stack.imgur.com/TYX0B.png">
and all seems fine– Smollet777
Nov 20 at 14:01
so i just paste url of the img into body
<body bgcolor="blue" background="https://i.stack.imgur.com/TYX0B.png">
and all seems fine– Smollet777
Nov 20 at 14:01
1
1
Could be that it is just a mismatch on the image path. Can you confirm the image is actually loaded on request or if it hits 404? You can do so by Accessing
developer tools
, under the Network
tab and refreshing your request– Diogo Santo
Nov 20 at 14:06
Could be that it is just a mismatch on the image path. Can you confirm the image is actually loaded on request or if it hits 404? You can do so by Accessing
developer tools
, under the Network
tab and refreshing your request– Diogo Santo
Nov 20 at 14:06
with the link it works but with the address of the folders, it does not work @Smollet777
– AlexLogic
Nov 20 at 14:06
with the link it works but with the address of the folders, it does not work @Smollet777
– AlexLogic
Nov 20 at 14:06
|
show 1 more comment
5 Answers
5
active
oldest
votes
up vote
0
down vote
accepted
You already set bgimg-1 class. All you need to add the class to the body tag. Also, you don't need to force it using background ="images/sfondo.png" in the body tag.
<body class="bgimg-1" bgcolor="blue">
Check the full code below-
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:28
@AlexLogic I will but I want you to try it first. Please follow my instruction. Both buttons have a common class name w3-button. So all you need to add a background color for that class.
– Mostafa Baezid
Nov 20 at 14:36
1
@AlexLogic here is the css you need add to achive the white background for the buttons. .w3-button{ background-color: #fff; }
– Mostafa Baezid
Nov 20 at 14:38
add a comment |
up vote
0
down vote
You created a CSS class name .bgimg-1
, but you haven't used it anywhere. You likely want <body class="bgimg-1">
in order to assign that CSS to it.
You should also make sure that file exists at the path specified. You can find out in Chrome dev tools by inspecting the <body>
and clicking the background URL to open it in a new tab. Either an image will display, or you'll get a 404 error.
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
Add the class you created to the body element.
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1" bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
First of all, the attributes "background" and "bgcolor" are old methods and are non-conforming, so you should use CSS background / background-color properties instead.
Second, reading the comments it seems that your path is not correct.
Good luck!
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
please add the class attribute in the body tag
like this
<body class="bgimg-1">
or just replace it with this
- with regards. kevil
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53394567%2fchange-background-image-whit-html-and-css%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You already set bgimg-1 class. All you need to add the class to the body tag. Also, you don't need to force it using background ="images/sfondo.png" in the body tag.
<body class="bgimg-1" bgcolor="blue">
Check the full code below-
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:28
@AlexLogic I will but I want you to try it first. Please follow my instruction. Both buttons have a common class name w3-button. So all you need to add a background color for that class.
– Mostafa Baezid
Nov 20 at 14:36
1
@AlexLogic here is the css you need add to achive the white background for the buttons. .w3-button{ background-color: #fff; }
– Mostafa Baezid
Nov 20 at 14:38
add a comment |
up vote
0
down vote
accepted
You already set bgimg-1 class. All you need to add the class to the body tag. Also, you don't need to force it using background ="images/sfondo.png" in the body tag.
<body class="bgimg-1" bgcolor="blue">
Check the full code below-
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:28
@AlexLogic I will but I want you to try it first. Please follow my instruction. Both buttons have a common class name w3-button. So all you need to add a background color for that class.
– Mostafa Baezid
Nov 20 at 14:36
1
@AlexLogic here is the css you need add to achive the white background for the buttons. .w3-button{ background-color: #fff; }
– Mostafa Baezid
Nov 20 at 14:38
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You already set bgimg-1 class. All you need to add the class to the body tag. Also, you don't need to force it using background ="images/sfondo.png" in the body tag.
<body class="bgimg-1" bgcolor="blue">
Check the full code below-
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
You already set bgimg-1 class. All you need to add the class to the body tag. Also, you don't need to force it using background ="images/sfondo.png" in the body tag.
<body class="bgimg-1" bgcolor="blue">
Check the full code below-
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
edited Nov 20 at 14:29
answered Nov 20 at 14:21
Mostafa Baezid
1,9942715
1,9942715
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:28
@AlexLogic I will but I want you to try it first. Please follow my instruction. Both buttons have a common class name w3-button. So all you need to add a background color for that class.
– Mostafa Baezid
Nov 20 at 14:36
1
@AlexLogic here is the css you need add to achive the white background for the buttons. .w3-button{ background-color: #fff; }
– Mostafa Baezid
Nov 20 at 14:38
add a comment |
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:28
@AlexLogic I will but I want you to try it first. Please follow my instruction. Both buttons have a common class name w3-button. So all you need to add a background color for that class.
– Mostafa Baezid
Nov 20 at 14:36
1
@AlexLogic here is the css you need add to achive the white background for the buttons. .w3-button{ background-color: #fff; }
– Mostafa Baezid
Nov 20 at 14:38
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:28
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:28
@AlexLogic I will but I want you to try it first. Please follow my instruction. Both buttons have a common class name w3-button. So all you need to add a background color for that class.
– Mostafa Baezid
Nov 20 at 14:36
@AlexLogic I will but I want you to try it first. Please follow my instruction. Both buttons have a common class name w3-button. So all you need to add a background color for that class.
– Mostafa Baezid
Nov 20 at 14:36
1
1
@AlexLogic here is the css you need add to achive the white background for the buttons. .w3-button{ background-color: #fff; }
– Mostafa Baezid
Nov 20 at 14:38
@AlexLogic here is the css you need add to achive the white background for the buttons. .w3-button{ background-color: #fff; }
– Mostafa Baezid
Nov 20 at 14:38
add a comment |
up vote
0
down vote
You created a CSS class name .bgimg-1
, but you haven't used it anywhere. You likely want <body class="bgimg-1">
in order to assign that CSS to it.
You should also make sure that file exists at the path specified. You can find out in Chrome dev tools by inspecting the <body>
and clicking the background URL to open it in a new tab. Either an image will display, or you'll get a 404 error.
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
You created a CSS class name .bgimg-1
, but you haven't used it anywhere. You likely want <body class="bgimg-1">
in order to assign that CSS to it.
You should also make sure that file exists at the path specified. You can find out in Chrome dev tools by inspecting the <body>
and clicking the background URL to open it in a new tab. Either an image will display, or you'll get a 404 error.
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
up vote
0
down vote
You created a CSS class name .bgimg-1
, but you haven't used it anywhere. You likely want <body class="bgimg-1">
in order to assign that CSS to it.
You should also make sure that file exists at the path specified. You can find out in Chrome dev tools by inspecting the <body>
and clicking the background URL to open it in a new tab. Either an image will display, or you'll get a 404 error.
You created a CSS class name .bgimg-1
, but you haven't used it anywhere. You likely want <body class="bgimg-1">
in order to assign that CSS to it.
You should also make sure that file exists at the path specified. You can find out in Chrome dev tools by inspecting the <body>
and clicking the background URL to open it in a new tab. Either an image will display, or you'll get a 404 error.
answered Nov 20 at 14:05
Charles Stover
82339
82339
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
Add the class you created to the body element.
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1" bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
Add the class you created to the body element.
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1" bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
up vote
0
down vote
Add the class you created to the body element.
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1" bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
Add the class you created to the body element.
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1" bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1" bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
<!DOCTYPE html>
<?php
session_start();
if(!isset($_SESSION["username"])){
header('location: ../index.php');
}else
{
?>
<html>
<head>
<title>G.E.D.</title>
<link href="../paginaIniziale/css/bootstrap-4.0.0.css" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bgimg-1{
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://i.stack.imgur.com/TYX0B.png");
min-height: 100%;
}
</style>
</head>
<body class="bgimg-1" bgcolor="blue" background="images/sfondo.png">
<div class="w3-top">
<div class="w3-bar w3-padding w3-card" style="background-color: #ffc107">
<h1>G.E.D. - S.A.L.C.</h1>
</div>
</div>
<div class="w3-display-middle w3-contener" >
<a class="w3-center w3-padding-large w3-black w3-xlarge w3-wide" style="margin-left: 22px;">Seleziona un operazione</a>
<div class="w3-center" style="margin-top: 40px;">
<a href="../pagineHtml/inserimento/inserimentoGenerale/inserimentoCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Milano </a>
<a href="azioniVisualizza/sceltaCantiere.php" class="w3-bar-item w3-button"><i class="fa fa-home"></i>Roma </a>
</div>
</div>
</body>
</html>
<?php } ?>
answered Nov 20 at 14:11
Itay Gal
7,15952559
7,15952559
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
First of all, the attributes "background" and "bgcolor" are old methods and are non-conforming, so you should use CSS background / background-color properties instead.
Second, reading the comments it seems that your path is not correct.
Good luck!
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
First of all, the attributes "background" and "bgcolor" are old methods and are non-conforming, so you should use CSS background / background-color properties instead.
Second, reading the comments it seems that your path is not correct.
Good luck!
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
up vote
0
down vote
First of all, the attributes "background" and "bgcolor" are old methods and are non-conforming, so you should use CSS background / background-color properties instead.
Second, reading the comments it seems that your path is not correct.
Good luck!
First of all, the attributes "background" and "bgcolor" are old methods and are non-conforming, so you should use CSS background / background-color properties instead.
Second, reading the comments it seems that your path is not correct.
Good luck!
answered Nov 20 at 14:23
A. Meshu
6072615
6072615
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
Thank you for your kind reply .. would you be so kind as to be able to put the buttons "Milan", "Rome" with a white background?
– AlexLogic
Nov 20 at 14:31
add a comment |
up vote
0
down vote
please add the class attribute in the body tag
like this
<body class="bgimg-1">
or just replace it with this
- with regards. kevil
add a comment |
up vote
0
down vote
please add the class attribute in the body tag
like this
<body class="bgimg-1">
or just replace it with this
- with regards. kevil
add a comment |
up vote
0
down vote
up vote
0
down vote
please add the class attribute in the body tag
like this
<body class="bgimg-1">
or just replace it with this
- with regards. kevil
please add the class attribute in the body tag
like this
<body class="bgimg-1">
or just replace it with this
- with regards. kevil
answered Nov 20 at 15:14
kevil
385
385
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53394567%2fchange-background-image-whit-html-and-css%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
So where exactly is the element that the selector
.bgimg-1
is supposed to match then …?– misorude
Nov 20 at 13:57
i can't understand ..where i must put this selector ? @misorude
– AlexLogic
Nov 20 at 13:59
so i just paste url of the img into body
<body bgcolor="blue" background="https://i.stack.imgur.com/TYX0B.png">
and all seems fine– Smollet777
Nov 20 at 14:01
1
Could be that it is just a mismatch on the image path. Can you confirm the image is actually loaded on request or if it hits 404? You can do so by Accessing
developer tools
, under theNetwork
tab and refreshing your request– Diogo Santo
Nov 20 at 14:06
with the link it works but with the address of the folders, it does not work @Smollet777
– AlexLogic
Nov 20 at 14:06