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

simple fixed layout

On this page I want to recreate table effect at the top of the page,
with CSS. The effect is to have several components in a row, and the
last cell in the row expand the width of the browser.

I have recreated the effect using a CSS float, but when the browser is
rezised he elements stack up, which I would prefer not to happen.

Is there a way in CSS, other than absolutely positioning to get them
to act in the same way as the table cells???

http://homepage.ntlworld.com/davidp.hopkins/cells.htm
Jul 20 '05 #1
2 1742
In article David wrote:
On this page I want to recreate table effect at the top of the page,
with CSS. The effect is to have several components in a row, and the
last cell in the row expand the width of the browser.

I have recreated the effect using a CSS float, but when the browser is
rezised he elements stack up, which I would prefer not to happen.
Why do you prefer that? It is usually much better if elements stack up.
Is there a way in CSS, other than absolutely positioning to get them
to act in the same way as the table cells???
#container {display:table;}
#container * {display:table-cell;}
http://homepage.ntlworld.com/davidp.hopkins/cells.htm


#container {min-width:<big-enaugh-number>px}

Neither works in IE.

http://www.svendtofte.com/code/max_width_in_ie/

This propably does also, but requires stupid empty div:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>Test</title>
<style type="text/css">
#container .p1{float:left;width:100px;height:32px;
background:yellow;border: 1px solid blue}
#end {height:32px;background: #FF6835}
#foo {width:500px}
</style>
<div id="container">
<div id="foo"></div>
<div class="p1"></div>
<div class="p1"></div>
<div class="p1"></div>
<div class="p1"></div>
<div id="end"></div>
</div>
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #2
Used a hack from http://www.svendtofte.com/code/max_width_in_ie/ to
set a min-width to give the desired effect in everything except Opera!

http://homepage.ntlworld.com/davidp.hopkins/cells.htm
Jul 20 '05 #3

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

Similar topics

1
by: Dario de Judicibus | last post by:
I wish to create two simple layouts by using only HTML, CSS and the minimum JavaScript as possible. Layouts should be "elastic" (no fixed widths and heights) and cross-browser enabled. The first...
179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
25
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are...
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...
6
by: KevinD | last post by:
assumption: I am new to C and old to COBOL I have been reading a lot (self teaching) but something is not sinking in with respect to reading a simple file - one record at a time. Using C, I am...
14
by: Melanie Avids | last post by:
Hi, I'm tired of banging my head on the computer. I'm hoping someone can help? I have a very small simple page that looks perfect in Firefox, Safari, and Netscape. It's clean. The HTML and CSS both...
3
by: Rangy | last post by:
Hi, I've decided to take the plunge and move from tables to a pure css layout. I still "think" in tables when I do my layouts and I was wondering the following: I have a simple, standard two...
2
by: soulmach | last post by:
Hello forum friends. I performed a search on this topic, but I couldn't find anything useful. I wasn't really sure what to search. First I'll state what I am trying to do. I recently agreed to...
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
by: gerry | last post by:
for anyone interested I did find a solution : .outer { float:left; border:solid 1px black; overflow:hidden: } .full {
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.