logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > HTML and CSS
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12-03-2012, 12:43 AM   #1
AnotherMe
 
Join Date: Dec 2012
Posts: 8
Default How can I get div centered and 25% down?

Hello everyone.
This is my first time posting here. I need my div container (with the other divs inside of it), to be centered and down around 25%. I am doing something wrong. Can anyone give me some direction?
Thanks
The Web Page
AnotherMe is offline   Reply With Quote
Old 12-03-2012, 01:14 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,176
Default

use margins must be position relative with margin left auto margin right auto and margin top as you want, div container will need a size to centre
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 12-03-2012, 12:53 PM   #3
AnotherMe
 
Join Date: Dec 2012
Posts: 8
Default

Quote:
Originally Posted by edbr View Post
use margins must be position relative with margin left auto margin right auto and margin top as you want, div container will need a size to centre
Thanks. I tried it but it doesn't work. I must be doing it wrong. I am doing it from within Dreamweaver CS5.5. Does it matter if I make the div container relative, static, fixed or absolute? Do the nested divs inside the container div get in the way of the container div's location?
AnotherMe is offline   Reply With Quote
Old 12-03-2012, 04:52 PM   #4
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Quote:
Originally Posted by AnotherMe View Post
Does it matter if I make the div container relative, static, fixed or absolute?
Yes it does matter. Don't set any of them. The POSITION property in CSS is not needed to center a DIV.
domedia is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:57 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com