473,399 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Background-attachment with value static

Hi,

I have one problem with my position of my background image. I have
created one div-tag that has a background image, which should be fixed
during scrolling. On the left side of the div is my menu-div, so the
content div is shown round 25% from the left browser side. In this
content div I would like to position a image on the left or right side.

I need a background-attachment: static, because the layout position is
the div, not the viewpoint. If I use background-attachment: static, it
isn't a valid css file, because only fixed and scroll are allowd.

You can see the idea on my webpage www.flashpixx.de. Some images will
be on the right side and some on the left in the content area. At the
moment my css is not valid and the IE make problems.

Does anyone an idea?

Thanks

Phil

May 19 '07 #1
4 2801
In article <f2**********@online.de>,
Philipp Kraus <ph***********@flashpixx.dewrote:
Hi,

I have one problem with my position of my background image. I have
created one div-tag that has a background image, which should be fixed
during scrolling. On the left side of the div is my menu-div, so the
content div is shown round 25% from the left browser side. In this
content div I would like to position a image on the left or right side.

I need a background-attachment: static, because the layout position is
the div, not the viewpoint. If I use background-attachment: static, it
isn't a valid css file, because only fixed and scroll are allowd.

You can see the idea on my webpage www.flashpixx.de. Some images will
be on the right side and some on the left in the content area. At the
moment my css is not valid and the IE make problems.

Does anyone an idea?

May I suggest a couple of things:

Instead of what you have in CSS try:

/* Redefine Tags */
body {
background-color: #FFFFFF;
font-family: sans-serif;
font-size: 100%;
text-decoration: none;
color: #000000;

}
/* Layout Daten */
#menu {

float: left;
width: 200px;
font-size: 50%;
}

#menu img {
border-style:solid;
border-width:1px;
border-color: #FFC852;
width: 60px;
height: 41px;
}

#menu div {

float: left;
width: 90px;
height: 80px;
}

#menu a {display: block;}

/* Content Daten */
#content {

margin-left: 210px;
padding: 5px;
border: 1px;
border-style:solid;
border-color: #999999;
background:#EFEFEF;
}

#content .pagetitle {
text-transform: uppercase;
font-size: large;
font-weight: bolder;
text-decoration: underline;
}

and in the HTML:
<!-- #NAVI -->
<div id="menu">
<div><a href="flashpixx/pages/projekte.php?name=main"><img
src="flashpixx/images/icons/maske.jpg"
alt="Projekte"></a>projekte</div>
<div><a href="flashpixx/pages/tutorials.php?name=main"><img
src="flashpixx/images/icons/seminar.jpg"
alt="Tutorials"></a>tutorials/studium</div>
<div><a href="flashpixx/pages/empfehlungen.php"><img
src="flashpixx/images/icons/auge.jpg"
alt="Empfehlungen"></a>empfehlungen</div>

<div><a href="flashpixx/pages/kenntnisse.php"><img
src="flashpixx/images/icons/stecker.jpg"
alt="Kenntnisse"></a>kenntnisse</div>
<div><a href="flashpixx/pages/taekwondo.php"><img
src="flashpixx/images/icons/asia.jpg" alt="Tae Kwon Do"></a>tae
kwon do</div>
<div><a href="flashpixx/pages/uebermich.php"><img
src="flashpixx/images/icons/platte.jpg" alt="Philipp
Kraus"></a>über mich</div>
</div>
<!-- /#NAVI -->
<!-- #CONTENT -->
These changes alone will improve the use of your page over
varying browser sizes. And hurdle all sorts of problems with your
page. See for yourself. try different browser sizes and font
settings in the browsers.

Gone is your positioning, thus gaining by losing what is not
needed. And the fonts at least in the content are now readable
better. Naturally, further improvements are possible. But this is
the direction I recommend.


You need to rethin

--
dorayme
May 20 '07 #2
On 2007-05-20 04:10:10 +0200, dorayme <do************@optusnet.com.ausaid:
In article <f2**********@online.de>,
........
>

These changes alone will improve the use of your page over varying
browser sizes. And hurdle all sorts of problems with your page. See for
yourself. try different browser sizes and font settings in the browsers.
Gone is your positioning, thus gaining by losing what is not needed.
And the fonts at least in the content are now readable better.
Naturally, further improvements are possible. But this is the direction
I recommend.

You need to rethin
Thanks a lot. I have tried this changes. It works very fine, but I
would like to position the backgroundimage on the left side of my
content div (I set the background position to the position of the
content div), on center or right side I can't position, because I don't
know the size of the div.

Thanks

Phil

May 20 '07 #3
In article <f2**********@online.de>,
Philipp Kraus <ph***********@flashpixx.dewrote:
On 2007-05-20 04:10:10 +0200, dorayme <do************@optusnet.com.ausaid:
In article <f2**********@online.de>,
.......


These changes alone will improve the use of your page over varying
browser sizes. And hurdle all sorts of problems with your page. See for
yourself. ... this is the direction
I recommend.

Thanks a lot. I have tried this changes. It works very fine, but I
would like to position the backgroundimage on the left side of my
content div (I set the background position to the position of the
content div), on center or right side I can't position, because I don't
know the size of the div.
OK, it is better than before. My suggestion of floating the divs
within the menu div was meant at first to allow the divs (mere
containers for the thumbnails and captions) to wrap on browser
size variations. It is slightly tricky to implement and you would
need to maybe use a max-width for the floated left menu div but
something more flexible for the actual width of the menu div
itself. For now, the floated inner divs are doing no harm but are
not taking advantage of the possibilities. I mention this now
because it looks a bit lavish to allow so much space to the left
unless you have a lot more thumbnails to put in. Perhaps you have
and all this is just a sketch of the real thing.

About bg image, you have it set on the content div, and it seems
fine to me judging by appearance on FF and Safari. I would tweak
it from 10px; to 0 for height from top but this is minor.

--
dorayme
May 20 '07 #4
Philipp Kraus wrote:
On 2007-05-20 04:10:10 +0200, dorayme <do************@optusnet.com.au>
said:
>In article <f2**********@online.de>,
.......
>>

These changes alone will improve the use of your page over varying
browser sizes. And hurdle all sorts of problems with your page. See
for yourself. try different browser sizes and font settings in the
browsers.
Gone is your positioning, thus gaining by losing what is not needed.
And the fonts at least in the content are now readable better.
Naturally, further improvements are possible. But this is the
direction I recommend.

You need to rethin

Thanks a lot. I have tried this changes. It works very fine, but I would
like to position the backgroundimage on the left side of my content div
(I set the background position to the position of the content div), on
center or right side I can't position, because I don't know the size of
the div.
Perhaps the difficulty you encounter is in accepting that the background
image may be used in a div, table or cell and that the position is
referrenced to the top left of the viewport/canvas even if nested inside
a Relatively or Absolutely Positioned Div. If positioned outside of the
div, table or cell viewport boundaries, the background image, or portion
thereof, will no longer be visible.

BTW, you should be using a Strict DTD and not Transitional so that you
do not activate Quirky browser behavior (all new pages should be using
Strict). If doing so, drop the XML Declaration which will cause IE to go
into Quirks mode all the same.

--
Gus
May 21 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: erik | last post by:
Is it posssible to inherit the previous pages (parent pages) background image? Is there a script out there I could look at? Thanks
2
by: Markus Mohr | last post by:
Hi, everyone, I have a special problem: For every monitor resolution in 200 pixel steps from 800 to 1600 pixels I have an image to be shown as centered background-image. Those images all...
27
by: Kevin Yu | last post by:
When I declare on HTML page <LINK href="mycss.css" type="text/css" rel=stylesheet /> .... <BODY class=myclass> in mycss.css BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY:...
3
by: MediaDesign | last post by:
so there's the problem: my text links have background images and when I put links around images on my page, they too get the background image treatment which I do not...I have tried several...
3
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
3
by: Viken Karaguesian | last post by:
Hello all, I need somehelp with background tiling. I have a sneaking suspicion that what I want to do is not possible, but I'll ask anyway. :>) First some background: Here's the site in...
3
by: KNDesign | last post by:
I've set a background image to repeat-y and at 100% height. It appears fine when I open the window, but when I resize to a smaller height so that I must scroll down to see the rest, the background...
1
by: nicky77 | last post by:
Hi, I've created a nav bar using a background image for rollover effects. Everything works as I had hoped, however, for some reason it seems that an area of whitespace (the same size of the...
2
XedinUnknown
by: XedinUnknown | last post by:
Hi! I am new to this forum, but not new to web design and programming. Nevertheless, I have never tried to use PNG so extensively in my pages. here's the problem. First, I have found that the...
2
by: thephatp | last post by:
I'm having a problem with IE rendering correctly. I'm experimenting with using all div's in my pages now, and I'm not very familiar with the quirks of IE. I have created a sample page, and I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.