473,416 Members | 1,868 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,416 software developers and data experts.

floating a center div

I am new at this, css, and am having trouble doing what I want to do.

I want div columns on the left and right that have a background
image. Then I want a div in the center, of fixed width, with my
content. I want the left and right divs to expand or contract to fill
the space when the browser is resized. Alternately I want the center
div to float over the side divs when the browser's width is less than
the width of the three div's width together.

What I have so far has the side divs covering the center div.
http://www.blueheronhealth.net/test.htm
Gary

Jul 26 '07 #1
2 2921
Hi Gary,
I'm pretty new to this, too, but maybe I can be of some help. It look
to me as though you're going about this the wrong way. You've got a
tiling background image that you are using to fill two foreground divs.
I think that what you want to do is get rid of the two side divs, and
use your bg image as just that. Kind of like this:
Jason,

That sounds so logical I was wondering why I did it the way I did.
It was because when I put the image in the background it showed
through above and below the center div.

http://www.blueheronhealth.net/test2.htm

Gary
Jul 27 '07 #2
Gary wrote:
>Hi Gary,
I'm pretty new to this, too, but maybe I can be of some help. It look
to me as though you're going about this the wrong way. You've got a
tiling background image that you are using to fill two foreground divs.
I think that what you want to do is get rid of the two side divs, and
use your bg image as just that. Kind of like this:

Jason,

That sounds so logical I was wondering why I did it the way I did.
It was because when I put the image in the background it showed
through above and below the center div.

http://www.blueheronhealth.net/test2.htm

Gary

That's from browser-default margins on the body element. You can fix
that, and similar problems, by clearing out all browser default styling.
You simply set margins, padding, and the like to '0' on all your elements.

There are many ways to do this, but there seem to be two major schools
of thought: one uses the universal selector (*, or "star" to it's
friends), and the other actually names every selector you want to clear.
Both are done at the beginning of your stylesheet. Both have their
pros and cons. I'd suggest googling "clear default css" and similar to
learn more. And again, anyone is more than welcome to correct me if I
got any of that wrong, as I'm a noob to this, myself. Best of luck.
Jul 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Allin Cottrell | last post by:
OK, I realize that what I am asking here is not likely to have a answer within the C standard. Nonetheless, it is not specific to any particular platform, so I'll hazard the question anyway. A...
13
by: tings | last post by:
An article states: "In floating point maths, where if you divide by a sufficiently large number sufficiently often, you will always be able to reach a value too small to distinguish from zero,...
2
by: Viken Karaguesian | last post by:
Hello all, This question is half css and half html based, so I chose this group. I have a theortical question. When positioning floating <div>'s, how much does it matter what order you put itin...
33
by: dis_is_eagle | last post by:
hi....i have encountered strange problem regarding floating point comparison...the problem is... main() { float a=0.7; if(0.7 a) printf("hi"); else printf("hello");
1
by: chr.aleksander | last post by:
Hey, I need a solution to two problems: #1 I use a three column layout, where the right and left columns are 150px wide and floated. The center column is not floated, with margins 150px on each...
70
by: Robert Gamble | last post by:
9899:1999 5.1.2.3 Example 4 reads: "EXAMPLE 4 Implementations employing wide registers have to take care to honor appropriate semantics. Values are independent of whether they are represented in a...
1
by: cazconv2007 | last post by:
Hi under my floating images i cant get text under them why not? it goes to the side <!--navigation menu--> <div id = "mainnavigation"> <a href = "home.html">Home</a> |<a href = ...
4
by: tbirnseth | last post by:
I'm having trouble between IE and FF. For once, IE behaves as I would expect, but FF doesn't. Basically I have a container with two floating DIVs in it. One floats left and the other right. I then...
5
by: jemcgui | last post by:
I've been building a site that has a quirk in it. It will display just as intended in IE but not firefox. The left "nav" div which is floating left will be forced down to the bottom of the page. The...
13
by: .... www.FocusOnPanama.com .... | last post by:
I have an annoying problem with the site I am developing. This is how I see the problem appear: In a paragraph (<P>) I start with an IMG tag that has an 'align=left' OR 'align=right' (with the...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.