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

Fluid bkg image in Dreamweaver CS6?

Community Beginner ,
Jan 10, 2017 Jan 10, 2017

I am working in Dreamweaver CS6 to create a small website. I have been fighting with the menu, trying responsive image maps and image links with no success.

What I'm trying now is a fluid background image, but it isn't adjusting in size correctly. Any help would be greatly appreciated. I want to add text links on top of the blue background and to the right of the logo.

Below is  the HTML, and then the CSS

<!doctype html>

<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->

<!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->

<!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->

<!--[if gt IE 8]><!-->

<html class="">

<!--<![endif]-->

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Untitled Document</title>

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

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

<style type="text/css">

body,td,th {

    font-family: Arial, Helvetica, sans-serif;

    font-size: medium;

    color: #1A365E;

}

body {

    background-color: #8F8473;

    background-image: url(Images/Site_bkg.png);

    background-repeat: repeat-x;

    margin-left: 0%;

    margin-top: 0%;

    margin-right: 0%;

    margin-bottom: 0%;

}

a {

    font-size: medium;

    color: #1A365E;

}

a:link {

    text-decoration: none;

}

a:visited {

    text-decoration: none;

    color: #808D9F;

}

a:hover {

    text-decoration: underline;

    color: #1A365E;

}

a:active {

    text-decoration: none;

    color: #1A365E;

}

</style>

<!--

To learn more about the conditional comments around the html tags at the top of the file:

paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/

Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):

* insert the link to your js here

* remove the link below to the html5shiv

* add the "no-js" class to the html tags at the top

* you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build

-->

<!--[if lt IE 9]>

<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>

<![endif]-->

</head> 

<div class="gridContainer clearfix">

  <div id="LayoutDiv1"><img src="Images/Site_NavLine.png" alt="NavLine"></div>

  <div id="LayoutDiv2">

    <div align="center"><em><img src="Images/Site_HomeTop.png" alt="PageTop"></em></div>

  </div>

  <div id="LayoutDiv3">

    <div align="center"><img src="Images/Site_home.png"></div>

  </div>

  <div id="LayoutDiv4">

    <div align="center">3961 Abbott Dr.  |  S Hwy 71  |  Willmar, MN 56201<br>

Phone: 320-235-0095  |  Fax: 320-235-3239  |  Email: bondo-71@hotmail.com<br>

HOURS: Monday-Thursday 8:00-5:00, Friday 8:00-4:00<br>

© 2017 The Body Shop 71, Willmar, MN</div>

  </div>

</div>

</body>

</html>

_____________

@charset "UTF-8";

/* Simple fluid media

   Note: Fluid media requires that you remove the media's height and width attributes from the HTML

   http://www.alistapart.com/articles/fluid-images/

*/

img, object, embed, video {

    max-width: 100%;

}

/* IE 6 does not support max-width so default to width 100% */

.ie6 img {

    width:100%;

}

.responsive-scale:{

        width:100%;

        padding-bottom: 66.666666666667%; /*960px/1440px */

        background-image:Images/Site_bkg.png;

        background-size:cover;

        background-position:center; /* IE fix*/

}

/*

    Dreamweaver Fluid Grid Properties

    ----------------------------------

    dw-num-cols-mobile:        5;

    dw-num-cols-tablet:        5;

    dw-num-cols-desktop:    5;

    dw-gutter-percentage:    10;

   

    Inspiration from "Responsive Web Design" by Ethan Marcotte

    http://www.alistapart.com/articles/responsive-web-design

   

    and Golden Grid System by Joni Korpi

    http://goldengridsystem.com/

*/

/* Mobile Layout: 480px and below. */

.gridContainer {

    margin-left: auto;

    margin-right: auto;

    width: 89.3454%;

    padding-left: 0.8272%;

    padding-right: 0.8272%;

}

#LayoutDiv1 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv2 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv3 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv4 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

/* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */

@media only screen and (min-width: 481px) {

.gridContainer {

    width: 91.309%;

    padding-left: 0.8454%;

    padding-right: 0.8454%;

}

#LayoutDiv1 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv2 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv3 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv4 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

}

/* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */

@media only screen and (min-width: 769px) {

.gridContainer {

    width: 88.3636%;

    max-width: 1232px;

    padding-left: 0.8181%;

    padding-right: 0.8181%;

    margin: auto;

}

#LayoutDiv1 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv2 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv3 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

#LayoutDiv4 {

    clear: both;

    float: left;

    margin-left: 0;

    width: 100%;

    display: block;

}

}

760
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

correct answers 1 Correct answer

Community Expert , Jan 10, 2017 Jan 10, 2017

The only way to have images for your menu items in a responsive design is to create a separate image for each item. To do this I would use images sprites as described here How to Create a CSS Menu Using Image Sprites

Having said that, one of my clients wanted to have images for the navbar and when I showed him the problems that we would be faced with in a responsive design, we reverted to a text based menubar saving his images for a vertical navbar. See BunchOBlokes - Men in Crisis

In other word

...
Translate
Community Expert ,
Jan 10, 2017 Jan 10, 2017

The only way to have images for your menu items in a responsive design is to create a separate image for each item. To do this I would use images sprites as described here How to Create a CSS Menu Using Image Sprites

Having said that, one of my clients wanted to have images for the navbar and when I showed him the problems that we would be faced with in a responsive design, we reverted to a text based menubar saving his images for a vertical navbar. See BunchOBlokes - Men in Crisis

In other words, use text and not images in the same way that your Aussi colleges have done The Body Shop Australia | Cosmetics & Beauty Products

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
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 Beginner ,
Jan 11, 2017 Jan 11, 2017

What I'd like to do is to create a text-based menu, like on your BunchOBlokes sight. I just was hoping to have the navy and cream background bar running behind it. I've tried so many different things. Any other suggestions? I really appreciate your help!

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 ,
Jan 11, 2017 Jan 11, 2017

Use CSS to color the background of your <nav> element. 

With CSS you can have solids, semi-transparent or gradient fills along with optional borders if you like.

I rarely use background images in my web designs anymore because CSS can do so much with very small file size.

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
Community Beginner ,
Jan 11, 2017 Jan 11, 2017
LATEST

Thank you, Nancy; I'll try that.

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