Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 01-10-2009, 03:25 PM   #1 (permalink)
Contributing Member
 
Join Date: 12-14-08
Posts: 140
iTrader: 0 / 0%
Latest Blog:
None

2939195631902 is liked by many
CSS div/navigation alignment problem!! Just doesn't make sense...

I've added a few borders and uploaded the picture of the problem.
I've been attempting to fix is all day. Can someone shine me some light. I would appreciate it.

* Screenshot url: venogames.com/webpage.jpg

* Problems:
1. when i add the subheader_login div with the red border shown in the picture above, the navigation with the yellow border is pushed left from right. Why does it do this? They are not even in the same parent div.

2. for all three navigation: navi_primary_names (shown in white borders), navi_primary_names, footer_navi_names. No matter how i change the "margin-top: x;" value or "margin: x 5px; value, the navigation names stays the same. It doesn't change in height at all.

3. after adding either the black border on navi_primary, the parent div of navi_primary_names, the "register games" text is pushed from left to middle.




header.php (this is require() into the index page. This contains everything above "register games"):



<div id="header">

<div id="subheader">
<a href="index.php"><div id="hdflashgames_title">
</div></a>
<div id="subheader_login">

<?php
check_logged_in();
?>

</div>
</div>


<div id="header_navi">
<div id="navi_primary">
<?php
$navigation_set = get_all_navigation('navi_primary');
while ($row = mysql_fetch_array($navigation_set)) {
echo "<a href=" . $row['address_name'] . ".php" . ">";
echo "<div class=\"navi_primary_names\">" . $row['menu_name'] . "</div>";
echo "</a>";
}
?>
</div>

<div id="navi_secondary">
<?php
$navigation_set = get_all_navigation('navi_secondary');
while ($row = mysql_fetch_array($navigation_set)) {
echo "<a href=" . $row['address_name'] . ".php" . ">";
echo "<div class=\"navi_secondary_names\">" . $row['menu_name'] . "</div>";
echo "</a>";
}
?>
</div>
</div>

</div>







CSS:

body {
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
background: url(../direct_images/body_background.jpg) repeat-x;
overflow: hidden;
}

#content_body {
margin: 0px auto;
width: 970px;
padding: 0px 10px;
height: 800px; /*place holder*/
background: white;
}


/* header ---------- ---------- ---------- --------- */
#header {
background: url(../direct_images/header_navigation.jpg) no-repeat;
width: auto;
height: 100px;
}

#subheader {
width: 970px;
height: 70px;
}

#hdflashgames_title {
margin-top: 8px;
margin-left: 22px;
width: 222px;
height: 50px;
float: left;
}

#subheader_login {
margin: 10px 12px;
padding: 1px 6px;
background: url(../direct_images/login_header_box.gif) no-repeat;
width: 188px;
height: 48px;
float: right;
border: 1px solid red;
}

#header_navi {
width: 970px;
height: 30px;
}

#navi_primary {
height: 30px;
float: left;
border: 1px solid black; /*adding this border pushes "register games" to middle from left. */
}

#navi_secondary {
height: 30px;
float: right;
border: 1px solid yellow;
}

.navi_primary_names {
margin-top: 50px;/*the divs stay the same no matter what i put. 50px for example*/
display: inline;
color: white;
border: 1px solid white;
}

.navi_secondary_names {
margin: 50px 5px;/*the divs stay the same no matter what i put. 50px for example*/
display: inline;
color: white;
}



/* main content ----------- ---------------------------*/
#main_content {
height: 600px;
float: left;
}


/* footer ----------------------- --------- --------- */
#footer {
background: url(../direct_images/footer.gif);
height: 40px;
width: 970px;
float: left;
}

.footer_navi_names {
margin: 10px 10px auto 18px;
color: black;
display: inline;
}
2939195631902 is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox VS IE alignment problem DJ-Craig Coding Forum 12 06-14-2007 04:18 PM
image and paragraph alignment problem kade119 Coding Forum 3 03-26-2007 03:21 PM
Menu alignment problem kade119 Coding Forum 63 03-24-2007 06:55 PM
Images Alignment on Page problem. HELP leeuniverse Coding Forum 2 07-12-2006 04:40 AM
CSS alignment problem blelisa Coding Forum 9 04-19-2004 06:55 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 09:12 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.