473,671 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Maintaining page flow with right column

My right column content is created dynamically by an application so it
will vary in height. When the main content of the page takes up more
vertical space than the rigth column, I want the content to flow under
the right column (much like adding a picture and floating it right).
The problem is that the only way I can figure out how to make that
happen is to output the right column HTML before the main content.

This takes the right column out of the normal page flow, meaning that
if you removed all CSS, the page structure would be out of whack
because the right column would appear before the main body content...or
if a screen reader were reading the page, it would be off.

Is there a way with CSS to output the right column content after the
main body content so the page flow is correct? Page sample below.

John

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
..mainbody {width:600px; border:1px solid #000;}
..rightcol { float:right; width:150px; margin:5px; border: 2px solid
#ff0000;}
</style>
</head>
<body>
<div class="mainbody ">
<div class="rightcol ">
<div class="rightcol box">
<ul>
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
</ul>
</div>
</div>
<p>Text Text Text Text Text Text Text Text Text Text Text Text Text
Text
Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text</p>
</div>
</body>
</html>I

Nov 26 '06 #1
2 2030
Hi Johkar,

Don't worry, you aren't going mad, the browser is just behaving how it
is told to rather than necessarily how you'd like it to.

Basically, floating only occurs at the point where an item starts.

So when you put the right colum before the P tags you basically telling
the item to float, and any content that comes *after* it should wrap
around to the left.

When you put the right column stuff at the bottom, after the P tags and
you float it, there is nothing else following so there is nothing
floated past it.

Try it with a standard image tag and put a float on it or even
ALIGN=left or right and it will do the same thing.

I guess the reason for this is that 99% of the time you declare one
thing as being static and what follows is to wrap around it.

The only solution I could think of was to reduce the width of the P tag
so the div then popped up into the space that was left when you floated
it. The problem with this is that you won't get any wrapping, just a
trench down one side of your page... this then turns into a pretty
standard 2-column layout though.

Unless there was a serious design issue, I'd probably go down this
route if you are thinking accessibility - text wrapping around text
isn't always the nicest thing to look at and decipher anyway...
>From what I understand of the float behaviour though, what you are
trying to do can't be done simply by just floating alone.

Cheers
AndrewF

Nov 26 '06 #2

AndrewF wrote:
Hi Johkar,

Don't worry, you aren't going mad, the browser is just behaving how it
is told to rather than necessarily how you'd like it to.

Basically, floating only occurs at the point where an item starts.

So when you put the right colum before the P tags you basically telling
the item to float, and any content that comes *after* it should wrap
around to the left.

When you put the right column stuff at the bottom, after the P tags and
you float it, there is nothing else following so there is nothing
floated past it.

Try it with a standard image tag and put a float on it or even
ALIGN=left or right and it will do the same thing.

I guess the reason for this is that 99% of the time you declare one
thing as being static and what follows is to wrap around it.

The only solution I could think of was to reduce the width of the P tag
so the div then popped up into the space that was left when you floated
it. The problem with this is that you won't get any wrapping, just a
trench down one side of your page... this then turns into a pretty
standard 2-column layout though.

Unless there was a serious design issue, I'd probably go down this
route if you are thinking accessibility - text wrapping around text
isn't always the nicest thing to look at and decipher anyway...
From what I understand of the float behaviour though, what you are
trying to do can't be done simply by just floating alone.

Cheers
AndrewF
Thank you for the reply Andrew. You are correct in it being an
accessiblity issue. A normal right column takes up space down the
entire right side of the page whether there is content in it or not.
We are under some pressure to allow wrapping after the right column
content ends. We are still arguing the accessibliity and degradation
issues of doing so.

John

Nov 26 '06 #3

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

Similar topics

0
3944
by: Rary | last post by:
I am using XSL:FO to generate PDF report for my XML, generating it in tables, i want that tables should completely be at one place, if there is a page break , all the contents of the table should move to the next page. can any one suggest a way out? This is my code (number 18, Brunelli Rocco, should move to the next page): XML: <?xml version="1.0" encoding="windows-1252"?>
0
1330
by: Sean Givan | last post by:
I'm putting together a page layout, and I'm getting frustrated trying to recreate a setup that I had made before, but forgotten exactly how. The page is a table with two columns; the left is a fixed-width column that acts as the page's sidebar, while the right column contains the main text of the page. The tricky part is that inside the right column is another table, 1x1, that's aligned to the bottom right of the table cell, such that...
6
3840
by: John Topley | last post by:
Hi, I'm trying to create a pure CSS layout using DIVs. I have three DIVs (in one column) down the left hand side of my page, with a ten pixel vertical gap between each of them (the content is on the right). At the moment these DIVs are all using absolute positioning, with dimensions and co-ordinates specified in pixels. How can I make it so that if the user increases the font size the DIVs enlarge to accommodate the content but still...
0
2428
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as <fo:layout-master-set> <fo:simple-page-master margin-left="0.5in" margin-right="0.5in" page-width="8.5in" margin-bottom="0.5in" master-name="Section-odd-page" margin-top="0.5in" page-height="14in"> <fo:region-after region-name="xsl-region-after-odd"
2
1399
by: Tom wilson | last post by:
This is a huge problem. I'm going insane. I've tried to solve this elsewhere and no one can suggest how to make this work. To me, this should be a very basic thing to do. I have an asp.net application that is a survey acceptor. The site is to display a page of survey questions and accept the responses. It builds the entire page dynamically from SQL Server tables. The idea is that when a person submits their responses, if there are...
3
1427
by: Tom wilson | last post by:
This is a huge problem. I'm going insane. I've tried to solve this elsewhere and no one can suggest how to make this work. To me, this should be a very basic thing to do. I have an asp.net application that is a survey acceptor. The site is to display a page of survey questions and accept the responses. It builds the entire page dynamically from SQL Server tables. The idea is that when a person submits their responses, if there are...
27
1870
by: Raymond | last post by:
They say it's easier, but has anyone tried maintaining an ASP.NET site without the source code of the dlls? This was not a problem with classic ASP, all the code was almost always just in text files, easily viewable and most importantly readily AVAILABLE on the site, to anyone access to the site's folder. But just imagine, bunch of companies out there, managed by non-technical people, who have had a bunch of outside
4
2214
by: Nehmo Sergheyev | last post by:
After reading about text line length http://psychology.wichita.edu/surl/usabilitynews/72/columns.htm , I'm thinking about experimenting with columns of text on a page. Is it possible on an HTML page to have 2 columns of text where the text of one column flows to the next on the visible part of the page, and scrolling treats the 2 columns like the bottom of the right column is connected to the top of the left column? Scrolling down...
1
1878
by: Brock | last post by:
First note that I am using Framework 1.1. I have an .aspx page that is displaying a list of employees, but only the Employee Number, First Name, Last Name, and Title. It is working great. I recessed it in a <Div></Divto allow scrolling of just the data, not the page. What I need to do is place a DataList (also in a <Div></Divto allow scrolling of just the data) to the right of the Datagrid to show 40 Employee Detail fields (listed top to...
1
8598
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
8670
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
7437
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...
1
6229
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.