473,804 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

3 columns: fixed center column

Hello

i like to make the following lay out:

- 3 columns
- center column = fixed width
- left and right columns are not fixed and must take all the available
space there is left.
- left column has a background picture
- right column has another background picture

So the left and right column are fluid and the width wil change when the
browser window width is changing.

I don't know how to do this. Anyone?

Here is some code:

http://www.keyone.nl/temp/

Nov 26 '05
40 4499
Spartanicus wrote:
Mark <sc*****@xs4all .nl> wrote:

I don't think you understand my question.

I understood the question you posted just fine.

It is not about 3 columns

The question you posted was.

, but
about the width of the side columns

div.column{widt h:12em}

and how to get a image in these side
columns which strech:

column with streched image | content column | column with streched image

Background images can't be stretched with CSS 2.x, only tiled.


My english may be not that good that i get my question right i guess.

I meant "It is not about the 3 columns". Forgot "the".

My question:
<q>
- 3 columns
- center column = fixed width
- left and right columns are not fixed and must take all the available
space there is left.
- left column has a background picture
- right column has another background picture
</q>

And especially this part: "must take all the available space there is
left." And must contain the tiled background picture (100px high, 1 px
width). So width:12em does not do what i want.

Nov 27 '05 #11
Mark <sc*****@xs4all .nl> wrote:
My question:
<q>
- 3 columns
- center column = fixed width
- left and right columns are not fixed and must take all the available
space there is left.
- left column has a background picture
- right column has another background picture
</q>

And especially this part: "must take all the available space there is
left." And must contain the tiled background picture (100px high, 1 px
width). So width:12em does not do what i want.


I'm still not sure what you want, after having looked at your demo I'm
guessing that what you actually want is to create a masthead.

Based on my best guess, see if this works for you:
http://homepage.ntlworld.ie/spartanicus/keyone.htm

--
Spartanicus
Nov 27 '05 #12
Mark wrote:
kchayka wrote:
Mark wrote:
> http://www.keyone.nl/temp/
What i want to know is how to get my 1px images in both side columns
to show up and take all the space there is left.


It seems to me that you don't really want 3 columns at all, you just
want a background. You can easily do this with some nested divs, rather
than separate divs for the space on either side of the content area. And
it's pretty much a waste to use a 1px image for a background. Use the
background-color property instead.

<div>
<div class="content" ></div>
</div>

Set the background of content's container. Nest another div if need be
and/or use borders on the content to get different spacing effects.


What i want is on the left and right an image. This image is 100px high
and 1px width. So it is not about the color. Because the left and right
are different images, i like to know how to do this.


I had a go since nobody else had a suggestion.

First, I rearranged the html so that "container" came first.
Then, what I fudged is to position the banner absolutely with left:10%;
since the banner has a fixed width.
Then I gave left and right div a random width of 20% each and floated
each left and right respectively.
This way the banner overlays the left and right divs' horizontally tiled
background images and limited flex is provided.

Subsequent material will have to include a clear:both; and/or additional
top margin in order to be decently positioned below the extended banner
image.

--
Gus
Nov 28 '05 #13
Mark wrote:

i like to make the following lay out:

So the left and right column are fluid and the width wil change when the
browser window width is changing.

I don't know how to do this. Anyone?

Basically there is no way to do that. Not with floats. Either fix the
width of all the columns or make them all fluid.
For the floated columns to have more than one pixel width you must
supply a percentage width, a percentage of the viewport. Since the center
column is fixed, either there is a gap between the end columns and the
center, or the columns wrap because there is no space in a single row.

You have not told us *why* you require this odd layout. That would help
us offer a reasonable alternative.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Nov 28 '05 #14
Gus Richter wrote:
Mark wrote:
kchayka wrote:
Mark wrote:

>> http://www.keyone.nl/temp/
>
>
>
What i want to know is how to get my 1px images in both side columns
to show up and take all the space there is left.


It seems to me that you don't really want 3 columns at all, you just
want a background. You can easily do this with some nested divs, rather
than separate divs for the space on either side of the content area. And
it's pretty much a waste to use a 1px image for a background. Use the
background-color property instead.

<div>
<div class="content" ></div>
</div>

Set the background of content's container. Nest another div if need be
and/or use borders on the content to get different spacing effects.


What i want is on the left and right an image. This image is 100px
high and 1px width. So it is not about the color. Because the left and
right are different images, i like to know how to do this.


I had a go since nobody else had a suggestion.

First, I rearranged the html so that "container" came first.
Then, what I fudged is to position the banner absolutely with left:10%;
since the banner has a fixed width.
Then I gave left and right div a random width of 20% each and floated
each left and right respectively.
This way the banner overlays the left and right divs' horizontally tiled
background images and limited flex is provided.

Subsequent material will have to include a clear:both; and/or additional
top margin in order to be decently positioned below the extended banner
image.


I put it up on a web space here to show that it can be done, using
floats, and for those that could not understand my writings:
<http://www.home.golden .net/~richterf/keyonemark/keyoneMark_x.ht m>

(I used top padding instead of top margin for subsequent material.)

--
Gus
Nov 28 '05 #15
Spartanicus wrote:
Mark <sc*****@xs4all .nl> wrote:

My question:
<q>
- 3 columns
- center column = fixed width
- left and right columns are not fixed and must take all the available
space there is left.
- left column has a background picture
- right column has another background picture
</q>

And especially this part: "must take all the available space there is
left." And must contain the tiled background picture (100px high, 1 px
width). So width:12em does not do what i want.

I'm still not sure what you want, after having looked at your demo I'm
guessing that what you actually want is to create a masthead.

Based on my best guess, see if this works for you:
http://homepage.ntlworld.ie/spartanicus/keyone.htm


A masthead it is! Thanks, this did work out.

So far i have this result: http://www.keyone.nl/temp/site05/

The content is scale-able. Also the pictures are scale-able.
I want the left and right picture also scale-able (if possible), but for
now: thanks.

Mark

Nov 28 '05 #16
Gus Richter wrote:
Gus Richter wrote:
Mark wrote:
kchayka wrote:

Mark wrote:

>>> http://www.keyone.nl/temp/
>>
>>
>>
>>
> What i want to know is how to get my 1px images in both side
> columns to show up and take all the space there is left.

It seems to me that you don't really want 3 columns at all, you just
want a background. You can easily do this with some nested divs, rather
than separate divs for the space on either side of the content area.
And
it's pretty much a waste to use a 1px image for a background. Use the
background-color property instead.

<div>
<div class="content" ></div>
</div>

Set the background of content's container. Nest another div if need be
and/or use borders on the content to get different spacing effects.
What i want is on the left and right an image. This image is 100px
high and 1px width. So it is not about the color. Because the left
and right are different images, i like to know how to do this.


I had a go since nobody else had a suggestion.

First, I rearranged the html so that "container" came first.
Then, what I fudged is to position the banner absolutely with
left:10%; since the banner has a fixed width.
Then I gave left and right div a random width of 20% each and floated
each left and right respectively.
This way the banner overlays the left and right divs' horizontally
tiled background images and limited flex is provided.

Subsequent material will have to include a clear:both; and/or
additional top margin in order to be decently positioned below the
extended banner image.


I put it up on a web space here to show that it can be done, using
floats, and for those that could not understand my writings:
<http://www.home.golden .net/~richterf/keyonemark/keyoneMark_x.ht m>

(I used top padding instead of top margin for subsequent material.)


Thanks. I have used Spartanicus' solution for now.
Now the content stays in the middle.

Mark

Nov 28 '05 #17
Jim Moe wrote:
Mark wrote:

i like to make the following lay out:

So the left and right column are fluid and the width wil change when
the browser window width is changing.

I don't know how to do this. Anyone?

Basically there is no way to do that. Not with floats. Either fix the
width of all the columns or make them all fluid.
For the floated columns to have more than one pixel width you must
supply a percentage width, a percentage of the viewport. Since the
center column is fixed, either there is a gap between the end columns
and the center, or the columns wrap because there is no space in a
single row.

You have not told us *why* you require this odd layout. That would
help us offer a reasonable alternative.


This is what i want:

http://www.keyone.nl//temp/site05/

Spartanicus helped me out. Now i like to have all the content
scale-able. The main content works out all right, now the left and
right side and then i am more than happy :0) I'll work on that.

Mark

Nov 28 '05 #18
On Sun, 27 Nov 2005 20:09:34 +0100, Mark <sc*****@xs4all .nl> wrote:
kchayka wrote:
It seems to me that you don't really want 3 columns at all, you just
want a background. You can easily do this with some nested divs, rather
than separate divs for the space on either side of the content area. And
it's pretty much a waste to use a 1px image for a background. Use the
background-color property instead.

<div>
<div class="content" ></div>
</div>

Set the background of content's container. Nest another div if need be
and/or use borders on the content to get different spacing effects.


What i want is on the left and right an image. This image is 100px high
and 1px width. So it is not about the color. Because the left and right
are different images, i like to know how to do this.


I tried to knock up a very quick attempt. I think this is approximately
what you're looking for:

http://www.xs4all.nl/~sbpoley/misc/backgrtest.html

Worked in Opera at the first attempt, but sadly not in either IE or
Firefox. Not sure what the problem is - any suggestions?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Nov 28 '05 #19
Mark wrote:
Gus Richter wrote:
Gus Richter wrote:
Mark wrote:

kchayka wrote:

> Mark wrote:
>
>>>> http://www.keyone.nl/temp/
>>>
>>>
>>>
>>>
>>>
>> What i want to know is how to get my 1px images in both side
>> columns to show up and take all the space there is left.
>
>
>
>
>
>
> It seems to me that you don't really want 3 columns at all, you just
> want a background. You can easily do this with some nested divs,
> rather
> than separate divs for the space on either side of the content
> area. And
> it's pretty much a waste to use a 1px image for a background. Use the
> background-color property instead.
>
> <div>
> <div class="content" ></div>
> </div>
>
> Set the background of content's container. Nest another div if need be
> and/or use borders on the content to get different spacing effects.
>

What i want is on the left and right an image. This image is 100px
high and 1px width. So it is not about the color. Because the left
and right are different images, i like to know how to do this.
I had a go since nobody else had a suggestion.

First, I rearranged the html so that "container" came first.
Then, what I fudged is to position the banner absolutely with
left:10%; since the banner has a fixed width.
Then I gave left and right div a random width of 20% each and floated
each left and right respectively.
This way the banner overlays the left and right divs' horizontally
tiled background images and limited flex is provided.

Subsequent material will have to include a clear:both; and/or
additional top margin in order to be decently positioned below the
extended banner image.


I put it up on a web space here to show that it can be done, using
floats, and for those that could not understand my writings:
<http://www.home.golden .net/~richterf/keyonemark/keyoneMark_x.ht m>

(I used top padding instead of top margin for subsequent material.)


Thanks. I have used Spartanicus' solution for now.
Now the content stays in the middle.


It is the one I would choose as well, although mine stays with the float
concept and accomplishes the same. As they say, "there are many ways to
skin a cat".

--
Gus
Nov 28 '05 #20

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

Similar topics

6
5634
by: Dennis | last post by:
In CSS3 it looks like we'll have multiple column flowing of text (newspaper style) in which the number of columns can be determined automatically given the available horizontal space. http://www.w3.org/TR/css3-multicol/ Until then, what's the current best practice for achieving the same effect? Or is it just not possible yet? Thanks ... Dennis
7
3248
by: Alex | last post by:
Hi Everone, I need some advice on how to setup 4 columns where the outside two are absolute (120px) and the inner two (side by side) are relevent (Fluid) and change with the screen. Here's my rough layout:
1
1320
by: Jennifer | last post by:
I have a datagrid where I am trying to align some columns to the center. The rest should be aligned to the right. When I try the code below I get an error message saying that the index is out of bounds. When debugging I get the column count of the datagrid to be 1. I find this rather ridiculous only because there are 61 columns that I can physically see. :) Plus, the data table that I am using to bind the datagrid has a count of 61. ...
13
2495
by: scorpion53061 | last post by:
Very urgent and I am very close but need a little help to get me over the edge........ I need to write these columns to a html file with each row containing these columns (seperated by breaks). Currently this code write all columns to a single row which works but is not what the boss wants. If anyone has suggestions how you would do a report like this I very much would like to hear them as well. vb.net windows app. ...
4
1337
by: Chuck Foster | last post by:
I have a datagrid and I want 3 columns to share the same column header. I have ColID, ColName, and 3 Hyperlink columns that need to have AdminFunctions as their header. Anyone know how to accomplish that? Thanks in advance for any help! Thanks, Chuck Foster
5
3800
by: Abhijeet Kumar | last post by:
Hi I am working with ASP.NET2.0, How can i freeze some of the columns of GridView Control. Thanks in Advance.
2
11726
by: Jacksm | last post by:
How can I align an asp:table columns with gridview columns (the widths)? I have tried setting table.column(0).width = gridview.column(0).width at page_load but it doesn't work. Thanks in advance
31
3116
by: Sarita | last post by:
Hello, this might sound stupid, but I got a really nice homepage template which unfortunately is a 3-Column Fixed Width CSS format. Now I don't have any content for the right column and would like the middle column just to use up that space instead. Any way this is possible? Thanks for your help, it is highly appreciated!
2
14738
by: bgold12 | last post by:
I have a problem that can be simplified to the following: I have a table with three columns. I need the middle column to be fixed width, let's say 100px. The other two columns I want to be variable width, such that one (say the left column) will minimize its width to the smallest it can be while still fitting a short line of text (no more than 32 characters) on a single line with no breaks. The right column I would then want to maximize...
0
9714
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10350
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10351
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10096
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.