PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Graphisme & Infographie > macromedia.dreamweaver > Background using an image
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Background using an image

Réponse
 
LinkBack Outils de la discussion
Vieux 13/06/2008, 18h25   #1
JDCreator
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Background using an image

Hi,

I'm having trouble applying an image to the background of the entire web page.
I am able to apply the background to the side bars and main container, but not
the space that separates these containers. Can someone explain to me what I'm
doing wrong?

Before using DreamWeaver CS3, I used DreamWeaver version 8 and found it more
intuitive to learn. I didn't have the problem with it like I'm having with CS3.

Thanks,

Jerry

  Réponse avec citation
Vieux 13/06/2008, 18h29   #2
Murray *ACE*
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background using an image

Show us your code....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"JDCreator" <webforumsuser@macromedia.com> wrote in message
news:g2uaig$kli$1@forums.macromedia.com...
> Hi,
>
> I'm having trouble applying an image to the background of the entire web
> page.
> I am able to apply the background to the side bars and main container, but
> not
> the space that separates these containers. Can someone explain to me what
> I'm
> doing wrong?
>
> Before using DreamWeaver CS3, I used DreamWeaver version 8 and found it
> more
> intuitive to learn. I didn't have the problem with it like I'm having
> with CS3.
>
> Thanks,
>
> Jerry
>


  Réponse avec citation
Vieux 13/06/2008, 22h30   #3
JDCreator
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background using an image

Here is the code of one of the pages attached. In this one the image is
repeated on the page instead of being stretched across the page like I want it
to be.

Thanks for your .

Jerry:smile;

@charset "utf-8";
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
margin: 0; /* it's good practice to zero the margin and padding of the body
element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text
is then set to the left aligned default in the #container selector */
color: #000000;
background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
}

/* Tips for this Hybrid layout
1. Since the side columns em-based sizing is based on the user's default font
size, you will want to be sure that background graphics in the columns take
that into account. Built correctly, this is more accessible for those that need
larger font sizes, since the width of the columns remains proportionate. If
this is undesirable with your design, simply change the width to a pixel size
and be sure to change the margins on the #mainContent div accordingly.
2. Since the sizing of side columns in this layout are based on the 100% font
size in the body element, if you decrease the text size overall by using a
font-size: 80% on the body element or the #container, remember that the column
widths will downsize proportionately. You may want to increase their widths,
and the size of the #mainContent div's side margins, to compensate for this.
3. If font sizing is changed in differing amounts on each div instead of on
the overall design (ie: #sidebar1 is given a 70% font size and #mainContent is
given an 85% font size), this will proportionately change each of the divs
overall size. You may want to adjust based on your final font sizing.
4. The #container div is not necessary for this layout at the 100% width. You
may want to use it to create faux columns or limit the width of the layout.
5. It is not neccessary to have the 100% width on the #container div since, by
nature, a div takes up 100% of the available space. It is here so that if you
want to decrease the size of the overall container - perhaps leaving a bit of
margin on each side - this will already be available for adjustment.
*/
.thrColHyb #container {
width: 100%;
/*margin: 0 auto; the auto margins (in conjunction with a width) center the
page if needed */
text-align: left; /* this overrides the text-align: center on the body
element. */
background-color: #FFFFFF;
background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
}

/* Tips for sidebar1:
1. Be aware that if you set a font-size value on this div, the overall width
of the div will be adjusted accordingly.
2. Since we are working in ems, it's best not to use padding on the sidebar
itself. It will be added to the width for standards compliant browsers creating
an unknown actual width.
3. Space between the side of the div and the elements within it can be created
by placing a left and right margin on those elements as seen in the ".thrColHyb
#sidebar1 p" rule.
*/
.thrColHyb #sidebar1 {
float: left;
width: 11em; /* the background color will be displayed for the length of the
content in the column, but no further */
padding: 15px 0; /* top and bottom padding create visual space within this
div */
background-color: #EBEBEB;
background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
background-position: left;
background-attachment: scroll;
}
.thrColHyb #sidebar2 {
float: right;
width: 11em; /* the background color will be displayed for the length of the
content in the column, but no further */
padding: 15px 0; /* top and bottom padding create visual space within this
div */
background-color: #EBEBEB;
background-image: none;
}
.thrColHyb #sidebar1 h3, .thrColHyb #sidebar1 p, .thrColHyb #sidebar2 p,
..thrColHyb #sidebar2 h3 {
margin-left: 10px; /* the left and right margin should be given to every
element that will be placed in the side columns */
margin-right: 10px;
background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
}

/* Tips for mainContent:
1. If you give this #mainContent div a font-size value different than the
#sidebar1 div, the margins of the #mainContent div will be based on its
font-size and the width of the #sidebar1 div will be based on its font-size.
You may wish to adjust the values of these divs.
2. The space between the mainContent and sidebar1 is created with the left
margin on the mainContent div. No matter how much content the sidebar1 div
contains, the column space will remain. You can remove this left margin if you
want the #mainContent div's text to fill the #sidebar1 space when the content
in #sidebar1 ends.
3. To avoid float drop, you may need to test to determine the approximate
maximum image/element size since this layout is based on the user's font sizing
combined with the values you set. However, if the user has their browser font
size set lower than normal, less space will be available in the #mainContent
div than you may see on testing.
4. In the Internet Explorer Conditional Comment below, the zoom property is
used to give the mainContent "hasLayout." This avoids several IE-specific bugs
that may occur.
*/
.thrColHyb #mainContent {
margin: 0 12em 0 12em; /* the right margin can be given in ems or pixels. It
creates the space down the right side of the page. */
padding: 0 2em 0 2em; /* padding here creates white space "inside the box." */
background-color: #FFFFFF;
}
.thrColHyb #mainContent h1 {
/*margin-top: 0; Though unnecessary while there's a border on the
#mainContent div, you may need to uncomment this rule if the borders are
removed. This will zero the margins of the first element in the #mainContent
div, avoiding margin collapse - a space between divs - in this case it will
create unwanted whitespace above the layout. */
}

/* Miscellaneous classes for reuse */
.fltrt { /* this class can be used to float an element right in your page. The
floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
}
.fltlft { /* this class can be used to float an element left in your page */
float: left;
margin-right: 8px;
background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
}
.clearfloat { /* this class should be placed on a div or break element and
should be the final element before the close of a container that should fully
contain a float */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}

  Réponse avec citation
Vieux 13/06/2008, 22h42   #4
Murray *ACE*
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background using an image

Background images don't stretch.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"JDCreator" <webforumsuser@macromedia.com> wrote in message
news:g2uoug$6t7$1@forums.macromedia.com...
> Here is the code of one of the pages attached. In this one the image is
> repeated on the page instead of being stretched across the page like I
> want it
> to be.
>
> Thanks for your .
>
> Jerry:smile;
>
> @charset "utf-8";
> body {
> font: 100% Verdana, Arial, Helvetica, sans-serif;
> margin: 0; /* it's good practice to zero the margin and padding of the
> body
> element to account for differing browser defaults */
> padding: 0;
> text-align: center; /* this centers the container in IE 5* browsers. The
> text
> is then set to the left aligned default in the #container selector */
> color: #000000;
> background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
> }
>
> /* Tips for this Hybrid layout
> 1. Since the side columns em-based sizing is based on the user's default
> font
> size, you will want to be sure that background graphics in the columns
> take
> that into account. Built correctly, this is more accessible for those that
> need
> larger font sizes, since the width of the columns remains proportionate.
> If
> this is undesirable with your design, simply change the width to a pixel
> size
> and be sure to change the margins on the #mainContent div accordingly.
> 2. Since the sizing of side columns in this layout are based on the 100%
> font
> size in the body element, if you decrease the text size overall by using a
> font-size: 80% on the body element or the #container, remember that the
> column
> widths will downsize proportionately. You may want to increase their
> widths,
> and the size of the #mainContent div's side margins, to compensate for
> this.
> 3. If font sizing is changed in differing amounts on each div instead of
> on
> the overall design (ie: #sidebar1 is given a 70% font size and
> #mainContent is
> given an 85% font size), this will proportionately change each of the divs
> overall size. You may want to adjust based on your final font sizing.
> 4. The #container div is not necessary for this layout at the 100% width.
> You
> may want to use it to create faux columns or limit the width of the
> layout.
> 5. It is not neccessary to have the 100% width on the #container div
> since, by
> nature, a div takes up 100% of the available space. It is here so that if
> you
> want to decrease the size of the overall container - perhaps leaving a bit
> of
> margin on each side - this will already be available for adjustment.
> */
> .thrColHyb #container {
> width: 100%;
> /*margin: 0 auto; the auto margins (in conjunction with a width) center
> the
> page if needed */
> text-align: left; /* this overrides the text-align: center on the body
> element. */
> background-color: #FFFFFF;
> background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
> }
>
> /* Tips for sidebar1:
> 1. Be aware that if you set a font-size value on this div, the overall
> width
> of the div will be adjusted accordingly.
> 2. Since we are working in ems, it's best not to use padding on the
> sidebar
> itself. It will be added to the width for standards compliant browsers
> creating
> an unknown actual width.
> 3. Space between the side of the div and the elements within it can be
> created
> by placing a left and right margin on those elements as seen in the
> ".thrColHyb
> #sidebar1 p" rule.
> */
> .thrColHyb #sidebar1 {
> float: left;
> width: 11em; /* the background color will be displayed for the length of
> the
> content in the column, but no further */
> padding: 15px 0; /* top and bottom padding create visual space within
> this
> div */
> background-color: #EBEBEB;
> background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
> background-position: left;
> background-attachment: scroll;
> }
> .thrColHyb #sidebar2 {
> float: right;
> width: 11em; /* the background color will be displayed for the length of
> the
> content in the column, but no further */
> padding: 15px 0; /* top and bottom padding create visual space within
> this
> div */
> background-color: #EBEBEB;
> background-image: none;
> }
> .thrColHyb #sidebar1 h3, .thrColHyb #sidebar1 p, .thrColHyb #sidebar2 p,
> .thrColHyb #sidebar2 h3 {
> margin-left: 10px; /* the left and right margin should be given to every
> element that will be placed in the side columns */
> margin-right: 10px;
> background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
> }
>
> /* Tips for mainContent:
> 1. If you give this #mainContent div a font-size value different than the
> #sidebar1 div, the margins of the #mainContent div will be based on its
> font-size and the width of the #sidebar1 div will be based on its
> font-size.
> You may wish to adjust the values of these divs.
> 2. The space between the mainContent and sidebar1 is created with the left
> margin on the mainContent div. No matter how much content the sidebar1
> div
> contains, the column space will remain. You can remove this left margin if
> you
> want the #mainContent div's text to fill the #sidebar1 space when the
> content
> in #sidebar1 ends.
> 3. To avoid float drop, you may need to test to determine the approximate
> maximum image/element size since this layout is based on the user's font
> sizing
> combined with the values you set. However, if the user has their browser
> font
> size set lower than normal, less space will be available in the
> #mainContent
> div than you may see on testing.
> 4. In the Internet Explorer Conditional Comment below, the zoom property
> is
> used to give the mainContent "hasLayout." This avoids several IE-specific
> bugs
> that may occur.
> */
> .thrColHyb #mainContent {
> margin: 0 12em 0 12em; /* the right margin can be given in ems or pixels.
> It
> creates the space down the right side of the page. */
> padding: 0 2em 0 2em; /* padding here creates white space "inside the
> box." */
> background-color: #FFFFFF;
> }
> .thrColHyb #mainContent h1 {
> /*margin-top: 0; Though unnecessary while there's a border on the
> #mainContent div, you may need to uncomment this rule if the borders are
> removed. This will zero the margins of the first element in the
> #mainContent
> div, avoiding margin collapse - a space between divs - in this case it
> will
> create unwanted whitespace above the layout. */
> }
>
> /* Miscellaneous classes for reuse */
> .fltrt { /* this class can be used to float an element right in your page.
> The
> floated element must precede the element it should be next to on the page.
> */
> float: right;
> margin-left: 8px;
> background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
> }
> .fltlft { /* this class can be used to float an element left in your page
> */
> float: left;
> margin-right: 8px;
> background-image: url(../MA%20Site%20Images/MargoWallpapW-Copyrt,Pl.jpg);
> }
> .clearfloat { /* this class should be placed on a div or break element and
> should be the final element before the close of a container that should
> fully
> contain a float */
> clear:both;
> height:0;
> font-size: 1px;
> line-height: 0px;
> }
>


  Réponse avec citation
Vieux 13/06/2008, 23h10   #5
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background using an image

..oO(Murray *ACE*)

>Background images don't stretch.


Hah!

In new Opera they can - the 9.5 final is out. ;-)

And it brings a lot of new CSS 3 stuff. Partly experimental, though, but
a step in the right direction and a really nice thing to play with.

http://dev.opera.com/articles/view/o...of-web-s/#css3

Micha

PS: Yes, I know that Opera is still the most underestimated browser. But
technologically it's on the very top and already shows what most other
browsers will come up with in a few months, as usual. Run Firefoxy, run!
  Réponse avec citation
Vieux 13/06/2008, 23h39   #6
Murray *ACE*
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background using an image

<shrug>
Zero of my clients use Opera.

Nice information, but totally irrelevant for now!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Michael Fesser" <netizen@gmx.de> wrote in message
news:84r554pb36dord1fc5k87eveg4bqguc13n@4ax.com...
> .oO(Murray *ACE*)
>
>>Background images don't stretch.

>
> Hah!
>
> In new Opera they can - the 9.5 final is out. ;-)
>
> And it brings a lot of new CSS 3 stuff. Partly experimental, though, but
> a step in the right direction and a really nice thing to play with.
>
> http://dev.opera.com/articles/view/o...of-web-s/#css3
>
> Micha
>
> PS: Yes, I know that Opera is still the most underestimated browser. But
> technologically it's on the very top and already shows what most other
> browsers will come up with in a few months, as usual. Run Firefoxy, run!


  Réponse avec citation
Vieux 13/06/2008, 23h44   #7
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background using an image

..oO(Murray *ACE*)

><shrug>
>Zero of my clients use Opera.
>
>Nice information, but totally irrelevant for now!


I knew that you would say that. ;-)

Micha
  Réponse avec citation
Vieux 13/06/2008, 23h47   #8
Murray *ACE*
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Background using an image

Which was why you offered it in the first place! 8)

Emails incoming!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Michael Fesser" <netizen@gmx.de> wrote in message
news:e0u5545sj9q4mrh9flthpej5nh2em0e6nd@4ax.com...
> .oO(Murray *ACE*)
>
>><shrug>
>>Zero of my clients use Opera.
>>
>>Nice information, but totally irrelevant for now!

>
> I knew that you would say that. ;-)
>
> Micha


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h04.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18957 seconds with 16 queries