User Name Password Register
DaniWeb IT Discussion Community
All
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 391,774 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,446 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: 242 | Replies: 5
Reply
Join Date: Mar 2008
Posts: 3
Reputation: phynias is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
phynias phynias is offline Offline
Newbie Poster

can't figure out how...

  #1  
Apr 15th, 2008
I can't figure out how to get boxes like this without images. I want to do it all with divs so any help would be appreciated.

http://turk-182.com/comp05.jpg

so i want to be able to put the orange boxes (more like box offset by a box) in rows and boxes. so basically multiple orange boxes on a single page.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2007
Posts: 13
Reputation: tashakota is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tashakota tashakota is offline Offline
Newbie Poster

Re: can't figure out how...

  #2  
Apr 15th, 2008
	<div style="width:300px; height: 300px; background-color:orange; float:left;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   </div>
	</div>
Reply With Quote  
Join Date: Mar 2008
Posts: 3
Reputation: phynias is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
phynias phynias is offline Offline
Newbie Poster

Re: can't figure out how...

  #3  
Apr 15th, 2008
that's not what i ment. if you look at the example the orange boxes arent exactly squares. they are sort of boxes offset with another box.

*edit: looking at your code it looks like you wanted to do the offset but when i put it in a page it just looks like yellow boxes surrounded by orange.
Last edited by phynias : Apr 15th, 2008 at 2:44 pm.
Reply With Quote  
Join Date: Jul 2007
Posts: 13
Reputation: tashakota is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tashakota tashakota is offline Offline
Newbie Poster

Re: can't figure out how...

  #4  
Apr 15th, 2008
As far as I know, you can't round corners of divs without using pictures.
Reply With Quote  
Join Date: Jul 2007
Posts: 13
Reputation: tashakota is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tashakota tashakota is offline Offline
Newbie Poster

Re: can't figure out how...

  #5  
Apr 15th, 2008
	<div style="width:300px; height: 300px; background-color:orange; float:left; margin:0px 3px 3px 3px;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   		<div style="width:200px; height:200px; position:relative; left:40px; top:40px; background-color:#FFCC33;">
			</div>
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left; margin:0px 3px 3px 3px;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   		<div style="width:200px; height:200px; position:relative; left:40px; top:40px; background-color:#FFCC33;">
			</div>
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left; margin:0px 3px 3px 3px;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   		<div style="width:200px; height:200px; position:relative; left:40px; top:40px; background-color:#FFCC33;">
			</div>
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left; margin:0px 3px 3px 3px;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   		<div style="width:200px; height:200px; position:relative; left:40px; top:40px; background-color:#FFCC33;">
			</div>
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left; margin:0px 3px 3px 3px;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   		<div style="width:200px; height:200px; position:relative; left:40px; top:40px; background-color:#FFCC33;">
			</div>
	   </div>
	</div>
	<div style="width:300px; height: 300px; background-color:orange; float:left; margin:0px 3px 3px 3px;">
	   <div style="width:200px; height:200px; position:relative; left:30px; top:30px; background-color:yellow;">
	   		<div style="width:200px; height:200px; position:relative; left:40px; top:40px; background-color:#FFCC33;">
			</div>
	   </div>
	</div>
Reply With Quote  
Join Date: Jul 2007
Posts: 13
Reputation: tashakota is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tashakota tashakota is offline Offline
Newbie Poster

Re: can't figure out how...

  #6  
Apr 15th, 2008
the above code is long and messy, so once *I* get it to the way I like, I use CSS instead of having all that in the main page. So each element would be given a name or class which would dictate what would happen to it.

So:
Main page of site
<div class="Orangebox">
	   <div class="yellowbox">
	   		<div class="otherorangebox">
			</div>
	   </div>
	</div>
	<div class="Orangebox">
	   <div class="yellowbox">
	   		<div class="otherorangebox">
			</div>
	   </div>
	</div>
	<div class="Orangebox">
	   <div class="yellowbox">
	   		<div class="otherorangebox">
			</div>
	   </div>
	</div>
	<div class="Orangebox">
	   <div class="yellowbox">
	   		<div class="otherorangebox">
			</div>
	   </div>
	</div>
	<div class="Orangebox">
	   <div class="yellowbox">
	   		<div class="otherorangebox">
			</div>
	   </div>
	</div>
	<div class="Orangebox">
	   <div class="yellowbox">
	   		<div class="otherorangebox">
			</div>
	   </div>
	</div>

CSS
.Orangebox {
	width:300px; 
	height: 300px; 
	background-color:orange; 
	float:left; 
	margin:0px 3px 3px 3px;
}

.yellowbox {
	width:200px; 
	height:200px; 
	position:relative; 
	left:30px; 
	top:30px; 
	background-color:yellow;
}

.otherorangebox {
	width:200px; 
	height:200px; 
	position:relative; 
	left:40px; 
	top:40px; 
	background-color:#FFCC33;
}
Last edited by tashakota : Apr 15th, 2008 at 3:22 pm.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 4:47 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC