Old 31-08-2005, 09:45   #1 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
Beginner need DIV-help

Ages since I posted here... Well, I'm starting to learn DIVs and stuff - but I have run into a problem.

I want the white frame to be centered AND have all the other three DIVs inside it. When I use float: left; on the base-DIV it looks just the way I want it, except that everything is on the left side ... I want it centered. Can anybody help me?

http://hem.passagen.se/athas/div_test.html

(Try to look past the ### banner at the top. This free webspace is the only I got right now...)
  Reply With Quote
Old 31-08-2005, 09:53   #2 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
Code:
body {text-align:center;} div {text-align:left;} .base {margin:auto;}
to make the container div stretch
http://www.positioniseverything.net/easyclearing.html

or have a look at faux columns
http://www.alistapart.com/articles/fauxcolumns/

Last edited by emil : 31-08-2005 at 09:54. Reason: fixed code
  Reply With Quote
Old 31-08-2005, 10:07   #3 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
Just wanted to add that the problem appears in Firefox ... it looks just like I want it in crappy IE ...

overflow: hidden; on the base-DIV gives me what I want ...almost - the menu-DIV jumps down below the posts-DIV. Crap!
  Reply With Quote
Old 31-08-2005, 10:14   #4 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
yeah. the div only stretches to accomodate its content...
read the first link I posted, it explains better than I do
  Reply With Quote
Old 31-08-2005, 10:16   #5 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
Thanks ... I will try that later. *rushing off to work*
  Reply With Quote
Old 31-08-2005, 10:18   #6 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
  Reply With Quote
Old 31-08-2005, 18:24   #7 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
It worked! Thanks .. but now a second problem pops up.

How do I get the right div (named menu) to stretch all the way down - like the posts-DIV does?

Last edited by thomaz : 31-08-2005 at 19:06.
  Reply With Quote
Old 01-09-2005, 03:13   #8 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,482
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
you could use the faux coulmns method (second link)
basically you need a thin repeating background image. It's simpler this way
  Reply With Quote
Reply



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

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8