HighDots Forums  

Center background image 3 (for Murray)

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Center background image 3 (for Murray) in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
judas2
 
Posts: n/a

Default Center background image 3 (for Murray) - 07-03-2004 , 09:41 AM






I asked:
A customer of mine LOVES very much his writing paper. So he would like that I
make the web pages of his site with his logo as background. The logo has to
display once and be centered at the browser page both vertically and
orizontally (even when you narrow it).

Micha very kindly answered

Use CSS and the background property, e.g.

body {
background: #RGB url(/path/to/image) no-repeat center
}

HTH
Micha

I answered:

Well, it works fine until I put some content inside. In fact if I put a Div or
a tabel witha a lot of text inside and then i scroll the browser window the
background image is not correctly displayed (looks broken in different lines)
I work on Mac, and the problem is only with IE (as usually) ;-)
Thx!!!

Then I wrote:

I resolved like this:
<body bgproperties="fixed">

And Murray answered

No - it's proprietary to IE, and it's not valid code.

What is it about Micha's explanation that you do not understand?

body {
background: #RGB url(/path/to/image) no-repeat center
}

Now I answer:
Well, there is nothing that I don't understand in the Micha code but I repeat
that it works fine until I put some content inside the page. In fact if I put
a Div or a tabel with a lot of text inside that page and then I scroll the
browser window the background image is not correctly displayed (looks broken in
different lines, gets squeezed and many other special effects that I don't need
and that I'd like to avoid)

Is there any way to avoid this strange behaviour without using <body
bgproperties="fixed">

THX a lot!!!


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Center background image 3 (for Murray) - 07-03-2004 , 09:49 AM






judas:

Quote:
Well, there is nothing that I don't understand in the Micha code but I
repeat
that it works fine until I put some content inside the page. In fact if I
put
a Div or a tabel with a lot of text inside that page and then I scroll the
browser window the background image is not correctly displayed (looks
broken in
different lines, gets squeezed and many other special effects that I don't
need
and that I'd like to avoid)

This behavior is not something that would be expected for a properly
functioning system. Can you show me a page where I can see it? Please post
a URI for such a page so that I can see what the background image does when
I scroll.

Quote:
Is there any way to avoid this strange behaviour without using <body
bgproperties="fixed"
There is nothing inherent in the use of proper CSS that would cause the
symptoms you are describing.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I asked:




Reply With Quote
  #3  
Old   
judas2
 
Posts: n/a

Default Re: Center background image 3 (for Murray) - 07-03-2004 , 10:20 AM



http://spamo.spymac.net/bg/img_bg_center.htm

the image displays incorrectly only when I scroll with IE Mac. That's why I used <body bgproperties="fixed">

Reply With Quote
  #4  
Old   
judas2
 
Posts: n/a

Default Re: Center background image 3 (for Murray) - 07-03-2004 , 10:24 AM



text-align: center;
in the body CSS definition missing, sorry

Thx a lot!!!

Reply With Quote
  #5  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Center background image 3 (for Murray) - 07-03-2004 , 10:45 AM



I see. Gotta love IE5/Mac....

This is a browser issue, not a code issue, really....

Have you tried the same thing with two divisions (both centering) - one
containing the image, and the other containing the text and at a higher
z-index?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
http://spamo.spymac.net/bg/img_bg_center.htm

the image displays incorrectly only when I scroll with IE Mac. That's why
I used <body bgproperties="fixed"




Reply With Quote
  #6  
Old   
judas2
 
Posts: n/a

Default Re: Center background image 3 (for Murray) - 07-03-2004 , 11:22 AM



the 2 DIVs don't stay one over the other even with a different z index if I
center both of them. Which position should they have? Certainly not absolute,
I doubt relative or static. Sorry, I'm not able to make it. So wrong if I fix
the bgproperties?


Reply With Quote
  #7  
Old   
judas2
 
Posts: n/a

Default Re: Center background image 3 (for Murray) - 07-03-2004 , 12:41 PM



I nested the divs but the result is not the same as if i'd put the image in the body background.
Thx anyway

Reply With Quote
  #8  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Center background image 3 (for Murray) - 07-03-2004 , 02:38 PM



<style type="text/css">
<!--
body {
text-align:center;
}

#wrapper {
text-align:left;
width:710px;
margin: 0 auto;
position:relative;
}

#bkgdiv {
width:352px;
height:288px;
background-image: url(immag.jpg);
background-repeat: no-repeat;
position:relative;
top



--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
the 2 DIVs don't stay one over the other even with a different z index if
I
center both of them. Which position should they have? Certainly not
absolute,
I doubt relative or static. Sorry, I'm not able to make it. So wrong if I
fix
the bgproperties?




Reply With Quote
  #9  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Center background image 3 (for Murray) - 07-03-2004 , 02:51 PM



Oops - ignore that! It wasn't supposed to be sent....

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote

Quote:
style type="text/css"
!--
body {
text-align:center;
}

#wrapper {
text-align:left;
width:710px;
margin: 0 auto;
position:relative;
}

#bkgdiv {
width:352px;
height:288px;
background-image: url(immag.jpg);
background-repeat: no-repeat;
position:relative;
top



--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote in message
news:cc6iv1$4m8$1 (AT) forums (DOT) macromedia.com...
the 2 DIVs don't stay one over the other even with a different z index
if
I
center both of them. Which position should they have? Certainly not
absolute,
I doubt relative or static. Sorry, I'm not able to make it. So wrong if
I
fix
the bgproperties?






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.