473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

float left and right on same line

http://www.hardwareforfree.com/
I'm trying to get the Consumer Gift Network image to be in the top right corner of the 800px area in the header. I have searched for hours and tried a lot of different things but it's still not working for me. I'm not very experienced so I'm sure it's something simple that I'm missing. Please look at the code below and tell me what I need to change.

Expand|Select|Wrap|Line Numbers
  1. ==============HEADER.TPL===================
  2.     <div id="header-control-div">
  3.         <div id="sub-logo-bar">
  4.             <h1><a href="{$site_url}">HardwareForFree</a></h1>
  5.             <p>&nbsp;</p>
  6.             <p style="line-height: 25%">Keep your money. Get it for FREE! &nbsp; <a href="javascript:pop('faq.htm')">How this works</a></p>
  7.             <p><br>&nbsp; &nbsp;<a href="login.php"><img src="images/icon_memberlogin.gif" width="11" height="14" border="0"> <font style="font-size: 11px; vertical-align: 10%;">Member Login</a></font></p>
  8.             <div id="account-info-box-home">
  9.                 <img style="float:right;" src="images/logo/cgn119x75.gif" width="119" height="75" border="0">
  10.             </div>
  11.         </div> <!-- END sub-logo-bar -->
  12.     </div> <!-- END header-control-div -->
  13.  
  14. ==============CSS=================
  15. #header-control-div    {    
  16.     width: 800px; height: auto;
  17.     margin: 0 auto; padding: 0;
  18.     }
  19.  
  20. #sub-logo-bar { 
  21.     background: transparent url('../images/bg/body-bg.jpg') 50% 0% no-repeat;
  22.     width: 800px; height: 100px;
  23.     }
  24.  
  25. #account-info-box-home {
  26.     width: 450px; height: auto;
  27.     display: block; float: right;
  28.     margin: 0 0 0 0; 
  29.     }
  30.  
  31. #sub-logo-bar h1 a {
  32.     background: transparent url('../images/logo/hardwareforfree202x35.gif') no-repeat left top;
  33.     display: block; float: left;
  34.     width: 202px;     height: 35px;
  35.     margin: 0 0 0 0 ; padding: 0;
  36.     text-decoration: none;
  37.     text-indent: -9999px;
  38.     outline: none; 
  39.     }
  40.  
  41. #account-info-box-home h1 a {
  42.     background: transparent url('../images/logo/cgn119x75.gif') no-repeat right top;
  43.     display: block; float: right;
  44.     width: 119px; height: 75px;
  45.     margin: 0 0 0 300px ; padding: 0;
  46.     text-decoration: none;
  47.     text-indent: -9999px;
  48.     outline: none; 
  49.     }
  50.  
Jul 8 '08 #1
4 3729
hsriat
1,654 Expert 1GB
First of all, for the whole page in a centered area of 800px, make a div (say wrapper) and add this to the CSS:
Expand|Select|Wrap|Line Numbers
  1. body {margin: 0 auto;}
  2. #wrapper {margin:0 auto; width:800px;}
Then try building the page inside the wrapper.

You have also messed up your HTML and CSS quite well. Have a look here.
Jul 8 '08 #2
b u m p b u m p b u m p
Jul 10 '08 #3
never mind i got it working
Jul 10 '08 #4
hsriat
1,654 Expert 1GB
never mind i got it working
Glad you fixed it.
Jul 10 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Chris Beall | last post by:
See http://pages.prodigy.net/chris_beall/BeallSprings/WC.Deed%20GG.116-17.html using the CSS at http://pages.prodigy.net/chris_beall/BeallSprings/BSstyle.css The page is a transcript of a...
4
by: Chris Sharman | last post by:
I've a very simple page (intranet, but moved to http://services.ccagroup.co.uk/dtest.html for you - so the links are all broken). essentially it's just a list of links. I've split it into two...
11
by: Dennis | last post by:
Please bear with me ... I am a newbie to DIVs. Why does the following work in IE6, but not in NS7? ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> ><HTML> > ><HEAD> > <META...
3
by: hantechs | last post by:
<html> <body> <p style="width:30%;">text1</p> <p style="float:left;">text2</p> </body> </html> The effect of this html code is : text1 and text2 each is on a line. My question is: Why text2...
22
by: ashkaan57 | last post by:
Hi, I am trying to put text on left and right side of the page and used: <div> <span>blah blah</span> <span style="float:right">blah blah</span> </div> The 2nd text does go to the right but the...
2
by: pbd22 | last post by:
Hi. I am learning my way around formatting DIVs and am stuck. Can somebody tell me how to format the below so the left column is, say, 30% wide and the right column is the remainder. And, there...
27
by: GloStix | last post by:
WARNING VIDEO TAKES A WHILE TO LOAD http://screencast.com/t/BWQ6DNtsM I really don't know how to fix this other than putting another div. But I dont' exactly want to do that for every page....
2
by: Ben C | last post by:
On 2008-04-08, Gus Richter <gusrichter@netscape.netwrote: Sometimes 0,0 of more than one container blocks occupy the same pixel on the screen, so this is not a good criterion. body float div...
15
dlite922
by: dlite922 | last post by:
I'm back again, Intro: I've got a floating div (outerDIV) with fixed width that contains an image (IMG) and a div that contains a short text (innerDIV) Problem: In FF, the innerDIV is...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.