473,406 Members | 2,220 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,406 software developers and data experts.

Fluid and Fixed 2 Column Layout

Hi,

How do I accomplish the following:

In a two-column layout, the right column is 200px wide, and the left
column is fluid?

Thanks!

May 17 '06 #1
9 3092
TristaSD wrote:
How do I accomplish the following:
This template may help:
http://benmeadowcroft.com/webdev/css...ht-column.html
http://benmeadowcroft.com/webdev/css...ght-column.css
In a two-column layout, the right column is 200px wide, and the left
column is fluid?


Best not to set a column width in pixels. Use em instead. When a visitor
resizes your text (vision problems), IE users who cannot resize pixels
will see the contents of that column bulge outside of it (assuming the
text itself was not hard-coded in size).

--
-bts
-Warning: I brake for lawn deer
May 17 '06 #2
Got it. How do I rock something like that in em's?

I got a fixed-width 200px calendar in the right column, but the left
column contains data that needs to be fluid. Right now I'm using
floats and percentages, left 75%, right is 200px / 800px = 25%. On
larger resolutions there is a lot of white space in the right
(calendar) column.

May 17 '06 #3
TristaSD wrote:
Got it. How do I rock something like that in em's?

I got a fixed-width 200px calendar in the right column, but the left
column contains data that needs to be fluid. Right now I'm using
floats and percentages, left 75%, right is 200px / 800px = 25%. On
larger resolutions there is a lot of white space in the right
(calendar) column.


In Ben's CSS, note the width for the .sidebar class: 10em
Try changing that to something around 20em.

Note also the margin-right in the .contentText class, at 12em. Change
that to 1 em more than the above sidebar class, or 21em.

Why 800px? Are you attempting fixed-width size for overall? Note how
Ben's page fits in any browser window. Think fluid design.
http://allmyfaqs.net/faq.pl?AnySizeDesign

--
-bts
-Warning: I brake for lawn deer
May 17 '06 #4
800px because that's the lowest common denominator, so if I make the
right navigation less than 25%, it will be clipped on 800x600.

Never would have guessed absolute positioning works so well. Thanks a
bunch.

May 17 '06 #5
TristaSD wrote:
800px because that's the lowest common denominator, so if I make the
right navigation less than 25%, it will be clipped on 800x600.
No, 800px isn't the "lowest". I frequently have a browser window open at
650-700px. You're thinking screen resolution, which isn't important, as
lots of people do not browse with maximized browsers. Think PDAs and
mobile phones, too. That's why I suggested the 'any-size-design' page.
Never would have guessed absolute positioning works so well. Thanks a
bunch.


You're welcome.

--
-bts
-Warning: I brake for lawn deer
May 17 '06 #6
Beauregard T. Shagnasty wrote:
TristaSD wrote:
How do I accomplish the following:


This template may help:
http://benmeadowcroft.com/webdev/css...ht-column.html
http://benmeadowcroft.com/webdev/css...ght-column.css


That's cool; the red box on the right side of the screen is transparent
when you move it over the background image. How does that work?
--
Brian O'Connor (ironcorona)
May 18 '06 #7
ironcorona wrote:
Beauregard T. Shagnasty wrote:
TristaSD wrote:
How do I accomplish the following:


This template may help:
http://benmeadowcroft.com/webdev/css...ht-column.html
http://benmeadowcroft.com/webdev/css...ght-column.css


That's cool; the red box on the right side of the screen is transparent
when you move it over the background image. How does that work?


It's a semi-transparent gif background image assigned in the CSS:

..other {
text-align : center;
background-image : url(images/redfilter.gif);

Here's the original image:
http://k75s.home.att.net/show/redfilter.gif
and enlarged; the non-red parts are set as transparent:
http://k75s.home.att.net/show/redfilter-large.gif

--
-bts
-Warning: I brake for lawn deer
May 18 '06 #8
Beauregard T. Shagnasty wrote:
ironcorona wrote:
Beauregard T. Shagnasty wrote:
TristaSD wrote:

How do I accomplish the following:
This template may help:
http://benmeadowcroft.com/webdev/css...ht-column.html
http://benmeadowcroft.com/webdev/css...ght-column.css

That's cool; the red box on the right side of the screen is transparent
when you move it over the background image. How does that work?


It's a semi-transparent gif background image assigned in the CSS:

.other {
text-align : center;
background-image : url(images/redfilter.gif);

Here's the original image:
http://k75s.home.att.net/show/redfilter.gif
and enlarged; the non-red parts are set as transparent:
http://k75s.home.att.net/show/redfilter-large.gif


That's truly a beautiful thing. Personally I've been gagging for the
opacity property [which you can try out in FF using -moz-opacity]:

http://www.w3.org/TR/css3-color/#transparency

Christmas may just have come early. It's not exactly the same but it
might be useful.

--
Brian O'Connor (ironcorona)
May 18 '06 #9
To further the education of mankind, ironcorona <ir*********@gmail.com>
vouchsafed:
That's truly a beautiful thing. Personally I've been gagging for the
opacity property [which you can try out in FF using -moz-opacity]:


You can use straight "opacity" in Firefox now and IE has a filter. I fade
thumbnails to 50% on visited.

--
Neredbojias
Infinity has its limits.
May 18 '06 #10

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

Similar topics

179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
5
by: Alex Bell | last post by:
I have a fluid header/two column layout at http://www.members.iinet.net.au/~abell1/test/demo10.htm which works with windows MSIE 5.5 and 6, Mozilla, Netscape, and Opera; and Safari but which...
22
by: Jam Pa | last post by:
Once again my big mouth has landed me with a tough job. I have a static CSS layout, where each and every element has been defined by pixel size - lots of them, too! Mostly relative elements,...
4
by: Rob Freundlich | last post by:
I have some servlet-generated tabular data that I need to present, so I'm using an HTML Table. In some cases, it can be quite large. I'm flushing the servlet output every N lines to push the data...
3
by: Spondishy | last post by:
OK... After a previous post, I've decided that the site layout will be two columns The layout will be: 1) Page 100% wide 2) Right column will be fixed 150px, left column will use the rest...
12
by: JB | last post by:
Hi All, Is it acceptable to use a fixed width vertical navigation column within a fluid 2 or 3 column layout? Example. Left Column (navigation) fixed width of say 180px Right Column (main...
3
by: wokm4n | last post by:
Hi, I'm currently working on this: http://www.richardvenneman.nl/kazenokoe The left part of the 'latest releases' is fixed width. A random image appears on the right side. But there seems to...
3
by: hzgt9b | last post by:
I want a page with a centered div containing two rows. Top row has an image and some text. The bottom row needs to have three columns. I'd love to have the 1st column set to a fixed width then have...
4
by: Jeff | last post by:
Hey I'm wondering how the Fixed-Width Text Format is What I know is that the top line in this text format will contain column names. and each row beneath the top line represent for example a...
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
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.