Can this be done? I need the image in a certain place on the page, within a div of its own.
tefflox
2
Junior Poster
Recommended Answers
Jump to Postyou shouldn't position anything but a <head> section outside a <body> section in your code.
but, you can make the div with the image in it on a separate 'layer', by putting it into a div like this:
<div style="position:absolute;top:0;left:0;">(picture here)</div>
Jump to Postis this problem similar to yours?
http://www.daniweb.com/techtalkforums/thread63900.html
either way, you can't position anything outside the body tag or section. you can make it appear to be so, but breaking HTML rules causes weird behaviour.
<html> <body> (everyything you want to show should be in …
Jump to PostI can't see that image.
There is a 'fixed' CSS attribute that gets mentioned in that thread.
A little research shows that it's not properly supported in IE6.. But it also shows some workarounds:
http://www.cssplay.co.uk/layouts/fixed.html
If you're already …
Jump to PostEDIT:
I see your edit, there is a way to make a fixed background:http://www.w3schools.com/css/tryit.asp?filename=trycss_background-attachment
If you do that, you could use the body section to supply the background, rather than another div.
…
Jump to Postyour div has no width or height. if it has no content, then it will be approx. 0 pixels high and wide, and will not show up atall.
this is always true, but is more noticeable with absolutely positioned divs.
either put some non-visible content in the div …
All 18 Replies
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
tefflox
2
Junior Poster
tefflox
2
Junior Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
tefflox
2
Junior Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
tefflox
2
Junior Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
tefflox
2
Junior Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
tefflox
2
Junior Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
tefflox
2
Junior Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
webecho
0
Newbie Poster
aslittell
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.