Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to Use Multiple Background Images For One Page in CSS

Community Beginner ,
Dec 01, 2016 Dec 01, 2016

Hello,

I was trying to add multiple background images in DW CC 2017 but was unable to. Instead, I had to code the CSS in Notepadd++ and then paste in into the DW CSS file.

Below is the code I typed in Notepad++ and had to paste into DW.

Thanks,

Sean

Index.html

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<link href="css/style.css" type="text/css" rel="stylesheet">

<link href="css/grid.css" type="text/css" rel="stylesheet">

<title>Untitled Document</title>

</head>

<body>

  <main>

  <header>

  <div class="inner">

  <h1 class="logo"><a href="#">AgroPlus-algriculture company</a></h1>

  </div>

  <nav>

  <ul class="menu">

  <li><a href="#">Home</a></li>

  <li><a href="#">Products</a></li>

  <li><a href="#">Technology</a></li>

  <li><a href="#">Pricing</a></li>

  <li><a href="#">Contact</a></li>

  </nav>

  </header>

  <section>

  </section>

  <footer>

  </footer>

  </main>

</body>

</html>

style.css

@charset "utf-8";

/* CSS Document */

body{

  background:url(../images/body-bg.gif) 50% 0;

  font:12px/18px arial;

  color:#717171;

  margin:0;

  padding:0;

  position:relative;

}

main{

  background:url(../images/main-bg.jpg) no-repeat center 0;

  min-height:100%;

}

/******************header*******************************/

header{

  position:relative;

  width:950px;

  margin:0px auto;

  padding:80px 0 0 0;

  background:url(../images/slide-1.jpg) no-repeat center 80px;

  z-index:2;

}

.inner{

  background:url(../images/header-bg.png);

  padding:26px 40px 25px 40px;

  position:relative;

  z-index:2;

}

/*********************logo***********************/

.logo {

  display:inline-block;

  padding:0;

}

.logo a{

  position:relative;

  background:url(../images/logo.png) no-repeat 0 0;

  height:58px;

  width:187px;

  display:block;

  overflow:hidden;

  text-indent:-99em;

}

.logo a {

  position: relative;

  background: url(../images/logo.png) no-repeat 0 0);

  height: 58px;

  width: 187px;

  display: block;

  overflow: hidden;

  text-indent: -99em;

}

852
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2016 Dec 02, 2016
LATEST

I don't understand the question either, sorry.

Why were you unable to open your CSS file & write the same code in DW?

Possibly, your code has some validation errors?

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines