Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > CSS
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 11-12-2009, 05:24 PM
  #1
Nukoca
Novice (Level 1)
 
Nukoca's Avatar
 
Join Date: Oct 2009
Posts: 10
iTrader: (0)
Nukoca is an unknown quantity at this point
Making divs follow directly after one another w/out "display:inline"

NOTE: I meant to make the title say, "Making divs follow directly after one another w/out 'display:inline'"

I need these four divs (home, cubes, sketches, and me) to be the top of the page and centered. However, they've decided that they'd rather sit at the beginning of the "transparent" div.

I'm using an HTML code snippet to display my blog posts. I'll be installing Wordpress later. Thanks in advance to those who are willing to decrypt my coding.

The top corners should display correctly once the navbar's in the right spot.

Here's what it looks like:
http://i38.tinypic.com/2iuqe6o.png

Here's my HTML:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<link rel="stylesheet" type="text/css" href="layout.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">


<title>The Lazy Astronomer</title>

</head>

<body>

<div id="planet">

<div id="home">home</div>
<div id="puzzles">puzzles</div>
<div id="sketches">sketches</div>
<div id="me">me</div>

<div id="transparent">

<div id="tc">
</div><!--end tc div-->

<div id="content">

<script src="http://feeds.feedburner.com/TheLazyAstronomer?format=sigpro" type="text/javascript" ></script><noscript><p>Subscribe to RSS headline updates from: <a href="http://feeds.feedburner.com/TheLazyAstronomer"></a><br />Powered by FeedBurner</p> </noscript>

</div><!--end content div-->

</div><!--end transparent div-->

<div id="bc">
</div><!--end bc div-->

</div><!--end planet div-->

</body>
</html>
And my CSS:
Code:
body {
    background:#000 url('bgimage.png') top center;
    font-family:"Verdana";
    font-size:.9em;}

#planet {
    margin-left:auto;
    margin-right:auto;
    background: url('earth.png') no-repeat top center;}
    
#home, #puzzles, #sketches, #me {
    background-image: url('container_bg.png');
    font-size:2.3em;
    height: 70px;
    text-align: center;
    width:225.5px;}
    
#home {float:left;}
#puzzles {float:left} 
#sketches {float: right;}
#me {float:right;}
 
 
#tc {
    background-image: url('tc.png');
    position:relative;
    top:-21px;
    left:26px;
    float:right;
    height:20px;
    width:950px;}

#bc {
    position: relative;
    top:-19px;
    background-image: url('bc.png');
    margin-left:auto;
    margin-right:auto;
    height:20px;
    width:950px;}

#transparent {
    margin-left:auto;
    margin-right:auto;
    padding:20px 25px;
    width: 898px;
    margin-top:100px;
    background-image:url('container_bg.png');}
    
#content {
    padding:15px 20px;
    background-color:#fff;
    list-style-type:none;}
    
.headline {
    font-size:1.5em;
    position:relative;
    left:15px;}
    
.headline a:link {color:#000000}
.headline a:link {color:#000000}
.headline a:visited {color:#000000}
.headline a:hover {color:#000000}
.headline a:active {color:#000000}

ul {position:relative; left:-30px;}
li {list-style-type:none;}

Last edited by Nukoca : 11-12-2009 at 05:41 PM.
Nukoca is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-13-2009, 04:18 AM
  #2
coothead
~ bald headed old fart ~
 
coothead's Avatar
 
Join Date: Aug 2003
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 7,919
iTrader: (0)
coothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to behold
Hi there Nukoca,

try adding clear:both; to your #transparent rules.
__________________
coothead is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-13-2009, 10:55 AM
  #3
Nukoca
Novice (Level 1)
 
Nukoca's Avatar
 
Join Date: Oct 2009
Posts: 10
iTrader: (0)
Nukoca is an unknown quantity at this point
Quote:
Originally Posted by coothead View Post
Hi there Nukoca,

try adding clear:both; to your #transparent rules.
Done. But there's another problem now... the '#transparent' div is ignoring my "margin-top:100px;" property. Also, how do I center the
'#home', '#puzzle', '#sketches' and '#me' divs over the top of the '#tranparent' div? Thanks again.

Here's the new screenshot: http://i38.tinypic.com/10p1404.png

Here's the new CSS:

Code:
body {
    background:#000 url('bgimage.png') top center;
    font-family:"Verdana";
    font-size:.9em;}

#planet {
    margin-left:auto;
    margin-right:auto;
    background: url('earth.png') no-repeat top center;}
    
#home, #puzzles, #sketches, #me {
    background-image: url('container_bg.png');
    font-size:2.3em;
    height: 70px;
    text-align: center;
    width:225.5px;}
    
#home {float:left;}
#puzzles {float:left} 
#sketches {float: right;}
#me {float:right;}
 
 
#tc {
    background-image: url('tc.png');
    position:relative;
    top:-21px;
    left:26px;
    float:right;
    height:20px;
    width:950px;}

#bc {
    position: relative;
    top:-19px;
    background-image: url('bc.png');
    margin-left:auto;
    margin-right:auto;
    height:20px;
    width:950px;}

#transparent {
    clear:both;
    margin-left:auto;
    margin-right:auto;
    padding:20px 25px;
    width: 898px;
    margin-top:100px;
    background-image:url('container_bg.png');}
    
#content {
    padding:15px 20px;
    background-color:#fff;
    list-style-type:none;}
    
.headline {
    font-size:1.5em;
    position:relative;
    left:15px;}
    
.headline a:link {color:#000000}
.headline a:link {color:#000000}
.headline a:visited {color:#000000}
.headline a:hover {color:#000000}
.headline a:active {color:#000000}

ul {position:relative; left:-30px;}
li {list-style-type:none;}

Last edited by Nukoca : 11-13-2009 at 11:01 AM.
Nukoca is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-13-2009, 11:49 AM
  #4
coothead
~ bald headed old fart ~
 
coothead's Avatar
 
Join Date: Aug 2003
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 7,919
iTrader: (0)
coothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to behold
Hi there Nukoca,

remove margin-top:100px; from your #transparent rules,and add margin-bottom:100px;
or whatever value, to your #home, #puzzles, #sketches, #me rules.

Also note that you cannot set a pixel value to 225.5px.
__________________
coothead is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-13-2009, 12:36 PM
  #5
Nukoca
Novice (Level 1)
 
Nukoca's Avatar
 
Join Date: Oct 2009
Posts: 10
iTrader: (0)
Nukoca is an unknown quantity at this point
Quote:
Originally Posted by coothead View Post
Hi there Nukoca,

remove margin-top:100px; from your #transparent rules,and add margin-bottom:100px;
or whatever value, to your #home, #puzzles, #sketches, #me rules.
Aha, that's better. http://i33.tinypic.com/530hox.jpg

But how do I make the divs on top be centered directly above '#transparent'?

Quote:
Originally Posted by coothead View Post
Also note that you cannot set a pixel value to 225.5px.
Nukoca is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-13-2009, 12:46 PM
  #6
coothead
~ bald headed old fart ~
 
coothead's Avatar
 
Join Date: Aug 2003
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 7,919
iTrader: (0)
coothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to behold
Hi there Nukoca,

try adding width:948px; to your #planet rules.
__________________
coothead is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-13-2009, 01:11 PM
  #7
¥åßßå
Blonde Bimbo
 
¥åßßå's Avatar
 
Join Date: Jul 2004
Posts: 2,242
iTrader: (0)
¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all
Quote:
Originally Posted by coothead View Post
Also note that you cannot set a pixel value to 225.5px.
Of course you can!

Although my monitor isn't good enough to display the difference

¥
__________________
I may have opened the door, but you entered of your own free will

¥åßßå is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-13-2009, 02:10 PM
  #8
Nukoca
Novice (Level 1)
 
Nukoca's Avatar
 
Join Date: Oct 2009
Posts: 10
iTrader: (0)
Nukoca is an unknown quantity at this point
Quote:
Originally Posted by coothead View Post
Hi there Nukoca,

try adding width:948px; to your #planet rules.
YOU DID IT! Ahahahaha! http://i38.tinypic.com/23sumj8.jpg

Thanks a bunch for your help.

Last edited by Nukoca : 11-13-2009 at 02:12 PM.
Nukoca is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-13-2009, 02:24 PM
  #9
coothead
~ bald headed old fart ~
 
coothead's Avatar
 
Join Date: Aug 2003
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 7,919
iTrader: (0)
coothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to beholdcoothead is a splendid one to behold
No problem, you're very welcome.
__________________
coothead is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


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



 
  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
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 10:30 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.