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.
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
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
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)
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
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
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
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
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/
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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:
|
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. ...
|
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.
...
|
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
| |
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.
|
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
|
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!
|
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...
|
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...
|
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,...
| |
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...
|
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...
|
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |