| | |
Css div problem
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2008
Posts: 138
Reputation:
Solved Threads: 0
Hai Friends,
I am designing a CSS based website, Well in that I need to adjust 3 div inside a main div as in the form of a table cell. Like this
====== Parent Div ===================
|||Child Div1 |||--|||Child Div2 |||--|||Child Div3|||
==================================
I had the code like this
CSS
html code
I tried this code but it doesn't showing anything. Please give me a little help about this issue.
Thanks
Rajeesh
I am designing a CSS based website, Well in that I need to adjust 3 div inside a main div as in the form of a table cell. Like this
====== Parent Div ===================
|||Child Div1 |||--|||Child Div2 |||--|||Child Div3|||
==================================
I had the code like this
CSS
#parent_div{
display:block;
width:900px;
height:200px;
}
#child_div1{
display:inline;
width:300px;
height:200px;
background:url(one.gif) left no-repeat;
}
#child_div2{
display:inline;
width:300px;
height:200px;
background:url(two.gif) left no-repeat;
}
#child_div3{
display:inline;
width:300px;
height:200px;
background:url(three.gif) left no-repeat;
}html code
<html> <head> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="parent_div"> <div id="child_div1"></div> <div id="child_div2"></div> <div id="child_div3"></div> </div> </body> </html>
I tried this code but it doesn't showing anything. Please give me a little help about this issue.
Thanks
Rajeesh
•
•
Join Date: Oct 2009
Posts: 7
Reputation:
Solved Threads: 1
0
#2 Oct 7th, 2009
By nothing do you mean it is displaying absolutely nothing, or are there missing images? You could try putting blanks in the divs ( )
Quality VPS Hosting Use coupon 100FREE to get double memory & bandwidth!
0
#4 Oct 7th, 2009
•
•
•
•
Hai Friends,
I am designing a CSS based website, Well in that I need to adjust 3 div inside a main div as in the form of a table cell. Like this
====== Parent Div ===================
|||Child Div1 |||--|||Child Div2 |||--|||Child Div3|||
==================================
I had the code like this
CSS
#parent_div{ display:block; width:900px; height:200px; } #child_div1{ display:inline; width:300px; height:200px; background:url(one.gif) left no-repeat; } #child_div2{ display:inline; width:300px; height:200px; background:url(two.gif) left no-repeat; } #child_div3{ display:inline; width:300px; height:200px; background:url(three.gif) left no-repeat; }
html code
<html> <head> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="parent_div"> <div id="child_div1"></div> <div id="child_div2"></div> <div id="child_div3"></div> </div> </body> </html>
I tried this code but it doesn't showing anything. Please give me a little help about this issue.
Thanks
Rajeesh
than remove any whitespace beteween divs in your html so you could eliminate the anoying whitespace added by fx for some irrational reason that I can't understand or explain.
•
•
Join Date: Oct 2009
Posts: 4
Reputation:
Solved Threads: 0
0
#5 Oct 8th, 2009
Hi Rajesh,
Try this below style. I have used backgroun color instead of images.
#parent_div{
display:block;
width:900px;
height:200px;
}
#child_div1{
float:left;
width:300px;
height:200px;
background-color:red;
}
#child_div2{
float:left;
width:300px;
height:200px;
background-color:black;
}
#child_div3{
float:left;
width:300px;
height:200px;
background:orange;
}
Regards.
Sneha
Try this below style. I have used backgroun color instead of images.
#parent_div{
display:block;
width:900px;
height:200px;
}
#child_div1{
float:left;
width:300px;
height:200px;
background-color:red;
}
#child_div2{
float:left;
width:300px;
height:200px;
background-color:black;
}
#child_div3{
float:left;
width:300px;
height:200px;
background:orange;
}
Regards.
Sneha
•
•
Join Date: Oct 2009
Posts: 18
Reputation:
Solved Threads: 0
0
#6 Oct 9th, 2009
•
•
•
•
Hi Rajesh,
Try this below style. I have used backgroun color instead of images.
#parent_div{
display:block;
width:900px;
height:200px;
}
#child_div1{
float:left;
width:300px;
height:200px;
background-color:red;
}
#child_div2{
float:left;
width:300px;
height:200px;
background-color:black;
}
#child_div3{
float:left;
width:300px;
height:200px;
background:orange;
}
Regards.
Sneha
yeah, try this one, i think this will work. and remember, if there is anyting else under child_div3 (such as child_div4), you should add this in the css file:
HTML and CSS Syntax (Toggle Plain Text)
#child_div4{ clear:both; }
![]() |
Similar Threads
- CSS Div problem (HTML and CSS)
- CSS/ Div Positioning problem (HTML and CSS)
- CSS Div help needed (HTML and CSS)
- CSS seperator problem (HTML and CSS)
- Have a problem with centering "jpg" files (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: Convert .wav file into bytes
- Next Thread: Css submenu
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





