What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » CSS Positioning Help

CSS Positioning Help
Author: Message:
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
O.P. CSS Positioning Help
I've come across a problem when trying to code my website for college.

I've used CSS to position two horizontal lines, for example:

code:
div#hr1
{
position: absolute;
top: 35px;
}

and in the HTML it is simply..

code:
<div id="hr1">
<hr>
</div>

But the problem is they appear in front of the image, like this:

[Image: linesqt2.png]

...and I want them to be behind the image. Or bring the image in front.

I've tried changing absolute to static, relative or fixed as explained here, but doesn't fix it.

Any ideas?
Twitter: @ChrisLozeau
03-04-2008 11:56 PM
Profile PM Find Quote Report
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
RE: CSS Positioning Help
put the code for the DIV higher in the code, and put the image in later. It has to do with layering and rendering order. the line is being rendered after the image, so its shown on top.
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
03-05-2008 12:00 AM
Profile PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: CSS Positioning Help
quote:
Originally posted by MeEtc
put the code for the DIV higher in the code, and put the image in later. It has to do with layering and rendering order. the line is being rendered after the image, so its shown on top.
or just adjust the z-index in css

http://www.w3schools.com/css/pr_pos_z-index.asp
[Image: dt2.0v2.png]      Happy Birthday, WDZ
03-05-2008 12:26 AM
Profile PM Web Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
O.P. RE: CSS Positioning Help
quote:
Originally posted by MeEtc

put the code for the DIV higher in the code, and put the image in later. It has to do with layering and rendering order. the line is being rendered after the image, so its shown on top.
Thank you that worked perfect :D

quote:
Originally posted by -dt-

or just adjust the z-index in css

http://www.w3schools.com/css/pr_pos_z-index.asp
Thanks -dt-, I'll keep that in mind. :)
Twitter: @ChrisLozeau
03-05-2008 01:02 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On