•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 402,811 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,066 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 618 | Replies: 5
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Good Day.
My div will not position properly. Rather, it just sits in the top-left corner. I have tried z-index with no luck. The first Div represents the background for my page, and the div inside of that is supposed to be positioned inside the message box on the background.
Any help is appreciated. Thanks.
My div will not position properly. Rather, it just sits in the top-left corner. I have tried z-index with no luck. The first Div represents the background for my page, and the div inside of that is supposed to be positioned inside the message box on the background.
Any help is appreciated. Thanks.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Rise & Flow | Flow & Rise</title> </head> <body> <center> <div style="background : url(http://i21.photobucket.com/albums/b253/karysmatik/rflowhome.jpg); border:#000000 3px SOLID; color:#ffffff; width:1024px;height:768px; z-index: 2;"> <div style="position:absoute; top:500; left:500; width:100; height:100; border:#000000 3px SOLID; color:#ffffff">DZHZDFHZDHZDGHZDGHZZGNFGNFNCONTENT</div> </div> </center> </font> </div> </body> </html>
•
•
Join Date: May 2008
Location: Hyderabad, India
Posts: 258
Reputation:
Rep Power: 1
Solved Threads: 27
give the alignment
Thanx,
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
•
•
Join Date: Jan 2008
Location: Bali - Indonesia
Posts: 61
Reputation:
Rep Power: 1
Solved Threads: 8
Try to remove "position:absolute" and the attributes. Use padding and margin to manage your div position. MMM maybe something like this
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Rise & Flow | Flow & Rise</title> </head> <body> <center> <div style="background : url(http://i21.photobucket.com/albums/b253/karysmatik/rflowhome.jpg); border:#000000 3px SOLID; color:#ffffff; width:1024px;height:768px; z-index: 2;"> <div style="margin-top:500px; margin-left:500px; width:100px; height:100px; border:#000000 3px SOLID; color:#ffffff">DZHZDFHZ DHZDGHZD GHZZGNF GNFN CONTENT</div> </div> </center> </font> </div> </body> </html>
Last edited by rudevils : Jul 15th, 2008 at 12:54 am. Reason: add content
Good day, karysma.
Your code had a few errors marked with red.
Solution:
Report:
1. There was a typing error in "position" declaration "absoute"
2. z-Index is not needed for absolutely positioned elements to come into view, -they get on top of all nonpositioned elements by default.
3. Few other closures for elements which are not opened: "</font> </div>" removed.
Regards.
Your code had a few errors marked with red.
•
•
•
•
Good Day.
My div will not position properly. Rather, it just sits in the top-left corner. I have tried z-index with no luck. The first Div represents the background for my page, and the div inside of that is supposed to be positioned inside the message box on the background.
Any help is appreciated. Thanks.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Rise & Flow | Flow & Rise</title> </head> <body> <center> <div style="background : url(http://i21.photobucket.com/albums/b253/karysmatik/rflowhome.jpg); border:#000000 3px SOLID; color:#ffffff; width:1024px;height:768px; z-index: 2;"> <div style="position:absoute; top:500; left:500; width:100; height:100; border:#000000 3px SOLID; color:#ffffff">DZHZDFHZDHZDGHZDGHZZGNFGNFNCONTENT</div> </div> </center> </font> </div> </body> </html>
Solution:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Rise & Flow | Flow & Rise</title>
</head>
<body>
<center>
<div style="background : url(http://i21.photobucket.com/albums/b253/karysmatik/rflowhome.jpg); border:#000000 3px SOLID; color:#ffffff; width:1024px;height:768px; ">
<div style="position: absolute; top:500; left:500; width:100; height:100; border:#000000 3px SOLID; color:#ffffff">DZHZDFHZDHZDGHZDGHZZGNFGNFNCONTENT</div>
</div>
</center>
</body>
</html>Report:
1. There was a typing error in "position" declaration "absoute"
2. z-Index is not needed for absolutely positioned elements to come into view, -they get on top of all nonpositioned elements by default.
3. Few other closures for elements which are not opened: "</font> </div>" removed.
Regards.
Last edited by Troy III : Jul 19th, 2008 at 4:55 am.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- browser incompatibility? page wont finish loading (JavaScript / DHTML / AJAX)
Other Threads in the HTML and CSS Forum
- Previous Thread: Hit Count of HTML Pages using a text file
- Next Thread: Problems uploading with Dreamweaver CS3



Linear Mode