CSS

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentCSS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old March 22nd, 2011, 07:54 AM
javascript12345 javascript12345 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 2 javascript12345 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 30 sec
Reputation Power: 0
Floating and positioning div

I am trying to make some divs arranged look like the picture attached

URL
http://farm6.static.flickr.com/5148/5549929422_297dbaba1b.jpg
  • div container has flexible width
  • divA and divC has fixed width and located at two sides of the window,
  • divB stays between divA and divC and fill the empty space between them
  • divA, divB and divC must be at the bottom of the div container

    finally,
  • there is divD (orange area), it is overlaped on divB, in the middle of div container

the following code is what i am working now, but cant work well
///////////////////////////////////////////////////////////////////
Code:
#div_container{
	position:relative;
	height:300px;
}

		#divD{
			width:500px;
			height:300px;
			position:absolute;
			margin: auto;
			left:0; right:0;
		}
		
		#divABC{
			height:30px;
			clear:both;
		}
		
			#divA{
				width:100px;
				height:30px;
				float:left;
			}
			
			#divC{
				width:100px;
				height:30px;
				float:right;
			}
			
			#divB{
				height:30px;
				margin-left:100px;
				margin-right:100px;
			}

Last edited by javascript12345 : March 22nd, 2011 at 07:56 AM.

Reply With Quote
  #2  
Old January 23rd, 2017, 06:03 AM
Rashmi.Padia Rashmi.Padia is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jan 2017
Location: Ahmedabad
Posts: 24 Rashmi.Padia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 8 m 8 sec
Reputation Power: 0
Floating and positioning div

Hi,
You can try this code,


Code:
<html> <head> <style> #div_container{ position:relative; height:330px; border:1px solid black; } #divD{ width:500px; height:328px; position:absolute; margin: auto; left:0; right:0; border:1px solid black; } #divABC{ height:30px; } #divA{ width:10%; height:30px; float:left; border:1px solid black; position:absolute; top:90%; } #divB{ width:80%; height:30px; margin-left:10%; margin-right:10%; border:1px solid black; position:absolute; top:90%; } #divC{ width:10%; height:30px; float:right; border:1px solid black; position:absolute; position:absolute; top:90%; left:90%; } </style> </head> <body> <div id="div_container"> <div id="divA"> </div> <div id="divB"> </div> <div id="divC"> </div> <div id="divD"> </div> <div> </body> </html>



Thanks,

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentCSS > Floating and positioning div


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap