473,395 Members | 1,471 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.

CSS background placement and div placement

RedSon
5,000 Expert 4TB
I've been working on a project for a customer part time. It's located here: http://lp-com.appspot.com/

I copied this template from the web from one of those free sites but I don't know enough about CSS to save my life! So I need help. You can see on the main page that right below the nav div is my navigation list then a clear div followed by the green and grey boxes.

On the main page the background image is just where I want it. Right below the nav links, pretty much dead center of the screen. But if you look at the about or contact us page you can see how the background image is being pushed down farther because of the length of the green box, which messes up the formatting.

What I would like to see is the background image stay put like it is on the main screen but the green and grey boxes just extend beyond the bottom edge of the background. This would therefore push the W3C checkers and the adverts down farther.

How do I do that in CSS?
Mar 4 '10 #1
11 3614
drhowarddrfine
7,435 Expert 4TB
Does adding to #gbox 'position:absolute' solve the problem?
Mar 4 '10 #2
RedSon
5,000 Expert 4TB
It does, but then it covers up everything else that is down below. The validation checker links and the adverts are obstructed by the gbox.
Mar 4 '10 #3
zorgi
431 Expert 256MB
Can you wrap #gbox into absolute layer and put validation checker and adverts to the bottom of that new absolute layer (within it).
Mar 4 '10 #4
RedSon
5,000 Expert 4TB
They are in div outer. I think if I put them in my gbox div they would be inside of the background image if the gbox was small. I want the validatio checker and adverts at the very bottom of everything.

Also, gbox is only 431px wide and my banner ad is longer than that.
Mar 4 '10 #5
zorgi
431 Expert 256MB
Sorry i corrected slightly my original post. before you answered I think.
Mar 4 '10 #6
RedSon
5,000 Expert 4TB
I'm not sure how to do that. I need gbox to be absolute, but I also need it to push things downward as it grows. I can't update div outer because then everything will be absolute. I might be able to create a new footer div or something, but I wouldnt know what to put in it. If it needed to be absolute or not.
Mar 4 '10 #7
zorgi
431 Expert 256MB
Here is some simple inline css just to illustrate what I meant. Red border represents new absolute layer. If you change height of layer that says "YOUR GREEN BOX" you will see what I ment.

Expand|Select|Wrap|Line Numbers
  1. <div style="width: 800px; height: 450px; background-color: #033;">
  2.     <div style="width: 500px; position: absolute; left: 50px; top: 50px; background-color:#333; border: solid 1px red;">
  3.         <div style="width: 150px; height: 300px; background-color: #090;  float: left">
  4.             YOUR GREEN BOX
  5.         </div>
  6.  
  7.         <div style="width: 350px; height: 500px; float: left; color: #FFF">
  8.             OTHER BOXES AND CONTENT
  9.         </div>
  10.         <div style="clear: both"></div>
  11.         <div style="width: 500px; height: 50px; background-color: #630; color: #FFF">FOOTER</div>
  12.     </div>
  13. </div>
  14.  
Mar 4 '10 #8
RedSon
5,000 Expert 4TB
I see what you mean but how do I translate what you have shown me into my CSS on the site?

From your example it looks like I need to create a footer div that lives inside my outer div.
Mar 4 '10 #9
zorgi
431 Expert 256MB
@RedSon
Yep. Footer and content would have to live within same absolute layer.
Mar 4 '10 #10
RedSon
5,000 Expert 4TB
If I make div outer absolute it moves it to the left hand side and ruins the layout.

Will it work if I just add a footer div or does it have to be in the absolute div area?
Mar 4 '10 #11
RedSon
5,000 Expert 4TB
Actually I'm going to go with an overflow:auto.

But thanks for the help!
Mar 4 '10 #12

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

Similar topics

2
by: Howard Lightstone | last post by:
Is there any way to display a photoimage background in a toplevel/frame? I tried replacing my topmost widget with a canvas but the ripple effects on placement and other widgets got too high. ...
20
by: Ioannis Vranos | last post by:
When we use the standard placement new operator provided in <new>, and not a definition of owr own, isn't a call to placement delete enough? Consider the code: #include <new>
3
by: Sridhar | last post by:
Hi, I have created a user control which has the html code as follows <TABLE id="ToolBarTable" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td align="right"...
14
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good...
0
by: Jeb Hunter | last post by:
Well, how can I describe this succinctly? I have a page with DIVs that us background images to produce a border effect. It works perfectly well, but I want to make up (for now) 3 different...
4
by: Gary | last post by:
Hello, I want a background image to display in the extreme bottom right corner. What I have works fine in IE7 and FF2 not so in Opera 9.1 Any suggestions? Page Posted at the the link. ...
5
by: Lagarde Sébastien | last post by:
Hello, I write code to debug new call with following macro: #define new (MemoryManager::Get().setOwner (__FILE__, __LINE__, _FUNCTION-), FALSE) ? NULL : new The setOwner allow to save the...
15
by: LuB | last post by:
I am constantly creating and destroying a singular object used within a class I wrote. To save a bit of time, I am considering using 'placement new'. I guess we could also debate this decision -...
9
by: karthikbalaguru | last post by:
Hi, I find that articles stating that 'placement new' constructs an object on a pre-allocated buffer and so takes less time. Actually, we have to consider the allocation of the buffer and then...
18
by: LayneMitch | last post by:
Hello. After getting great advice on positioning, I've edited my code and it's looking more stable. Now I need a little assistance with background image placement. Please click on this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.