473,385 Members | 1,356 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.

Two "simple" layouts

I wish to create two simple layouts by using only HTML, CSS and the minimum
JavaScript as possible. Layouts should be "elastic"/"liquid" (no fixed
widths and heights) and cross-browser enabled.

The first one is a non-scrollable page which contains a centered title and a
centered division with automatic scrolling on overflow, that is:

+---------------------+
| TITLE |
| +--------------++ |
| | || |
| | || |
| | || |
| | || |
| +==============++ |
+---------------------+
LAYOUT 1

When the page resizes, the inner division should resize accordingly.
The second layout is similar but the inner division is on the right,
wherease on left I have a fixed image.

+---------------------+
| TITLE |
| +---+ +--------++ |
| | | | || |
| | | | || |
| +---+ | || |
| | || |
| +========++ |
+---------------------+
LAYOUT 2

Note that it is VERY important do not assume pre-defined widths or heights.
Layouts should be all based on percentages and relative values.
Cross-browsing prevents iframe usage.

I was able to do that on IE, but it does not work in firebirds and other
browsers. I used mostly <DIV>. I tried also <TABLE> but with no success. The
box model is different for different browsers, and scroll bars sometimes do
not appear, or appear when they should not, or sizing or positioning is
wrong.

Any help appreciated.

Dario de Judicibus
Jul 20 '05 #1
1 2007
In article <bv**********@newsreader1.mclink.it>, no****@nowhere.com
enlightened us with...
I wish to create two simple layouts by using only HTML, CSS and the minimum
JavaScript as possible. Layouts should be "elastic"/"liquid" (no fixed
widths and heights) and cross-browser enabled.

The first one is a non-scrollable page which contains a centered title and a
centered division with automatic scrolling on overflow, that is:

These worked in IE6, NN7, and Opera 7. Scrollbar down when resized only.
Make it pretty in a really small window with padding as desired.

<html>
<head>
<title> New Document </title>
<style type="text/css">
body{
text-align: center;
}
#bodyDiv {
width: 90%;
overflow: auto;
text-align: left;
}
</style>
</head>
<body>
<div id="titleDiv">Title here</div>
<div id="bodyDiv">
<div>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
</div>
</body>
</html>
The second layout is similar but the inner division is on the right,
wherease on left I have a fixed image.


<html>
<head>
<title> New Document </title>
<style type="text/css">
body{
text-align: center;
width: 90%;
height: 100%;
}
#titleDiv{
position: relative;
top: 0;
height: 10%;
}
#bodyDiv {
width: 70%;
text-align: left;
position: absolute;
top: 10%;
left: 10%;
height: 90%;
}
#imgDiv {
position: absolute;
top: 10%;
width:10%;
height: 90%;
left: 0;
}
</style>
</head>
<body>
<div id="titleDiv">Title here</div>
<div id="imgDiv"><img src="warning.gif"></div>
<div id="bodyDiv">
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
a bunch of text a bunch of text a bunch of text a bunch of text a bunch
of text a bunch of text a bunch of text a bunch of text a bunch of text
a bunch of text a bunch of text<br>
</div>
</div>
</body>
</html>
--
--
~kaeli~
Who is General Failure and why is he reading my hard disk?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2

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

Similar topics

1
by: Mark Creelman | last post by:
Hello all: I am attempting to use a database program that I downloaded from http://www.thescripts.com/serversidescripting/perl/tutorials/asimpledatabaseprogram/database.txt with good...
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...
19
by: Kramer | last post by:
Hi all, And thank you all so very much for all your recommendations. This is a great group. I ran across a freeware uploader from Toma Web called, Simple FTP 2.0. Anyone have any knowledge...
2
by: Axel Dahmen | last post by:
Hi, I'd like to write a simple COM Automation Server in C# but couldn't find a matching project. I want to have the IDE maintain the IDL and the REG file automatically. Which project should I...
8
by: Beam_Us_Up_Scotty | last post by:
Hello all, I am trying to write a "simple" animation using C#, and I've tried many things but nothing seems to work for me without leaking memory. Here's a very simple piece of code that uses a...
6
by: JPSutor | last post by:
Does anyone have an example of a simple FTP trasfer app? All I need to do is transfer one file up to a web site and then retrieve it again. Every example I run into is loaded with code that, to...
3
by: BKDotCom | last post by:
This has surely been answered somewhere multiple times, but... I'm guessing it's some sort of "bubbling" thing.... <STYLE> ..triggerarea { border:#00C solid 1px; } </STYLE> <UL ID="menu">
5
by: Mark Chambers | last post by:
Hi there, Can anyone explain the following (very) simple scenario. 1) I make an exact copy of my "DataSet" and delete one record from a given table (in the copy) 2) I invoke...
23
by: Sacred Heart | last post by:
Hi, I'm new to Python and have come across a problem I don't know how to solve, enter com.lang.python :) I'm writing some small apps to learn the language, and I like it a lot so far. My...
2
by: fordie1000 | last post by:
Hi, Although I have been programming in python for years ... I rarely use classes .... just functions etc. .... anyway I was wondering if there is someone who could give me a simple way of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.