Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 21-05-2009
Member
 
Join Date: Mar 2008
Posts: 349
How to make a CSS div float OVER another div

Now I know how to build tables in html and css, I teach myself div. I understand the positioning of div blocks not so good. I have the following css code:

Code:
div # topbar ( 
position: absolute; 
top: 0px; 
left: 20px; 
height: 20px; 
width: 800px; 
text-align: right; 
font-family: Tahoma; 
background-color: # efefef; 
) 

div # left (border 
position: absolute; 
top: 0px; 
left: 0px; 
height: 500px; 
width: 20px; 
background-image: url ( "left.jpg"); 
) 

div # right (border 
position: absolute; 
top: 0px; 
left: 800px; 
height: 500px; 
width: 20px; 
background-image: url ( "right.jpg"); 
) 

div # logo ( 
position: absolute; 
top: 20px; 
left: 20px; 
height: 100px; 
width: 800px; 
background-image: url ( "logo.jpg"); 
)
It includes the following html page:

Code:
<html> 

<head> 
<title> div test page </ title> 
<link href="stijl.css" rel="stylesheet" type="text/css"> 
</ head> 

<body> 
<div id="topbar"> </ div> 
<div id = "left border" </ div> 
<div id = "right border" </ div> 
<div id = "logo" </ div> 
</ body> 

</ html>
The logo is something strange on left the hand. By placing the logo, It is of the position of the previous div. I do not want that. In the tutorial I follow do not. Since they use just absolute. Who can help me with this?
Reply With Quote
  #2  
Old 21-05-2009
Member
 
Join Date: May 2008
Posts: 256
Re: How to make a CSS div float OVER another div

First of all, you are missing 3x a ">", careless mistakes, internet explorer doesn't understands. And also omit anything left floating (float: left).
Reply With Quote
  #3  
Old 21-05-2009
Member
 
Join Date: Mar 2008
Posts: 349
Re: How to make a CSS div float OVER another div

Something still missing. Now I have that on right, and the logo is good, but when I left float is all together. I do not understand so well how to float and clear to work. I will in the future course flexible instead of divs that make static what I have now.

If I omit borders, and it works, but I use almost borders on every layout I create for example shadow effects, etc.
Reply With Quote
  #4  
Old 21-05-2009
Member
 
Join Date: May 2008
Posts: 256
Re: How to make a CSS div float OVER another div

For that kind of shadow effects you can download a background image of suit him wide 1600 x 20 pix where this gradient inside.

Tip, put it there as between:

Code:
# body ( 
margin: 0px auto; 
)
Do you also use container divs will be:

Code:
# container ( 
margin: 0px auto; 
)
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to make a CSS div float OVER another div"
Thread Thread Starter Forum Replies Last Post
Casting int to float in C Jensen Ackles Software Development 4 05-04-2010 05:08 PM
Float vs Double variable Samarth Software Development 5 19-12-2009 01:03 PM
How to convert string to float c# Pratyush Software Development 3 14-08-2009 01:09 PM
CSS float disappeared the background addie Software Development 3 29-06-2009 05:49 PM
CSS : How to float outside parent div Valerian Software Development 4 21-05-2009 12:03 PM


All times are GMT +5.5. The time now is 03:47 AM.