Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1827 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

DIV Placement Help

Thread title: DIV Placement Help
Closed Thread    
    Thread tools Search this thread Display Modes  
01-03-2006, 03:59 AM
#1
Spekta is offline Spekta
Status: I'm new around here
Join date: Dec 2004
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 0 / 0%
 

Spekta is on a distinguished road

  Old  DIV Placement Help

I have a problem with the divs on my site, here is the URL to the page
http://www.hiphoplegacy.net/index2.php?id=...&page=index.php
As you may have noticed, the board stats on the right is lower than the one on the left, i'd like to know how to make them both on the same line, if anyone can help it'd be greatly appreciated, here's the codes that may help.

index2.php content area
Code:
<div id="content">
<?
if (isset($_GET['page']) && isset($_GET['id']) && file_exists('content/'.$_GET[id].'/'.$_GET[page].'.php')) {
include 'content/'.$_GET[id].'/'.$_GET[page].'.php';
}
else {
include "content/news.php";
}
?>
</div>
news.php
Code:
<?
// Load and Start IPB SDK
require_once "ipbsdk/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();

// Grab Statistics
$stats = $SDK->get_board_stats();

// do some math and date formatting
$total = $stats['total_topics'] + $stats['total_replies'];
$stats['most_online_date'] = $SDK->ipbsdk_date($stats['most_online_date'], "M j Y, h:i A");

// Display Them
echo <<<HTML
<div id="contentboxtop">Board Stats</div><br /><br />
<div id="contentbox">
Total forum posts:<strong>{$total}</strong> posts.
<br />Total members:<strong>{$stats['mem_count']}</strong>
<br />Newest member:<a href="{$board_url}/index.php?showuser={$stats['last_mem_id']}">{$stats['last_mem_name']}</a>.
</div>
HTML;
?>

<?
// Load and Start IPB SDK
require_once "ipbsdk/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();

// Grab Statistics
$stats = $SDK->get_board_stats();

// do some math and date formatting
$total = $stats['total_topics'] + $stats['total_replies'];
$stats['most_online_date'] = $SDK->ipbsdk_date($stats['most_online_date'], "M j Y, h:i A");

// Display Them
echo <<<HTML
<div id="contentboxtop2">Board Stats</div><br /><br />
<div id="contentbox2">
Total forum posts:<strong>{$total}</strong> posts.
<br />Total members:<strong>{$stats['mem_count']}</strong>
<br />Newest member:<a href="{$board_url}/index.php?showuser={$stats['last_mem_id']}">{$stats['last_mem_name']}</a>.
</div>
HTML;
?>
css info for contentboxtop2 and contentbox
Code:
 
div#contentbox {
background-color: #060709;
float: left;
width: 200px;
color: #FFFFFF;
font-family: Verdana, Tahoma;
border-bottom: 1px dotted #CCCCCC;
}

div#contentboxtop {
float: left;
width: 200px;
background-color: #202125;
color: #FFFFFF;
font-family: Verdana, Tahoma;
font-size: 14px;
border-bottom: 1px dotted #CCCCCC;
}

Thanks to anyone who can help me out, it's greatly appreciated


Spekta

01-03-2006, 05:47 AM
#2
bcd is offline bcd
bcd's Avatar
Status: Junior Member
Join date: Oct 2005
Location: Cali
Expertise:
Software:
 
Posts: 96
iTrader: 0 / 0%
 

bcd is on a distinguished road

Send a message via AIM to bcd Send a message via MSN to bcd Send a message via Yahoo to bcd

  Old

Try floating the right div to the right?

01-03-2006, 06:08 AM
#3
Spekta is offline Spekta
Status: I'm new around here
Join date: Dec 2004
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 0 / 0%
 

Spekta is on a distinguished road

  Old

Oh my bad i forgot the code for the right div

Code:
div#contentbox2 {
float: right;
width: 200px;
background-color: #060709;
font-family: Verdana, Tahoma;
overflow: hidden;
}

div#contentboxtop2 {
float: right;
width: 200px;
background-color: #202125;
color: #FFFFFF;
font-family: Verdana, Tahoma;
font-size: 14px;
border-bottom: 1px dotted #CCCCCC;
overflow: hidden;
}
So it's already floated to right

01-03-2006, 06:15 AM
#4
Dray is offline Dray
Dray's Avatar
Status: Request a custom title
Join date: Sep 2005
Location: Texas
Expertise:
Software:
 
Posts: 1,139
iTrader: 0 / 0%
 

Dray is on a distinguished road

  Old

Put the contentbox in contentboxtitle

aka

<div id=contentboxtop>Blahblah<br><br>
<div id=contentbox>watever</div>
</div>

for both. Also try not to have <br>-s next to divs.

01-03-2006, 07:37 AM
#5
Spekta is offline Spekta
Status: I'm new around here
Join date: Dec 2004
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 0 / 0%
 

Spekta is on a distinguished road

  Old

Ah, worked like a charm, many thanks.

01-04-2006, 02:01 AM
#6
Dray is offline Dray
Dray's Avatar
Status: Request a custom title
Join date: Sep 2005
Location: Texas
Expertise:
Software:
 
Posts: 1,139
iTrader: 0 / 0%
 

Dray is on a distinguished road

  Old

You're welcome Post again if you need more help!

Closed Thread    


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

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed