473,503 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Revision bars in CSS?

I have a repository of aircraft technical documents that are converted
to HTML. The markup is incredibly ugly now because of the decision to
use table-based formatting. I'd like to remove everything from the
tables except, well, tables. The thing that has me stumped is that the
documents are required to display revision bars in the right-hand
margin alongside the data that has been changed since the previous
version. Of course, what was done was to add a narrow column to the
right and display the cell borders where necessary.

Does anyone know of a way to accomplish this same revision bar effect
with CSS instead of tables? Although sometimes there will need to be
revision bars to the right of particular rows of actual tables, in
addition to elements like paragraphs and list items.

I think this could be accomplished with Javascript, but I'd like to see
if there's a CSS-only solution to begin with.

Mar 14 '06 #1
10 2505
Ga******@gmail.com wrote:
I have a repository of aircraft technical documents that are converted
to HTML. The markup is incredibly ugly now because of the decision to
use table-based formatting. I'd like to remove everything from the
tables except, well, tables. The thing that has me stumped is that the
documents are required to display revision bars in the right-hand
margin alongside the data that has been changed since the previous
version. Of course, what was done was to add a narrow column to the
right and display the cell borders where necessary.

Does anyone know of a way to accomplish this same revision bar effect
with CSS instead of tables? Although sometimes there will need to be
revision bars to the right of particular rows of actual tables, in
addition to elements like paragraphs and list items.

I think this could be accomplished with Javascript, but I'd like to see
if there's a CSS-only solution to begin with.


That is a good question. I haven't tried it, but I imagine you could create
a class for 'insert' and a class for 'delete' and include not only the
styling for the text but also an image, vertical bar, in the left or right
margin. it obviously wouldn't be any more automatic than specifying a
border in a table, but it should work.

Carolyn
--
Carolyn Marenger

Mar 14 '06 #2
Carolyn Marenger <ca****@marenger.com> wrote:
That is a good question. I haven't tried it, but I imagine you could create
a class for 'insert' and a class for 'delete'
Why? The ins and del elements are made for exactly that purpose.
and include not only the
styling for the text but also an image, vertical bar, in the left or right
margin.


Or specify border-right: 3px solid red; or similar? Why much about
with images?

Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Mar 14 '06 #3
Ga******@gmail.com wrote:
The thing that has me stumped is that the
documents are required to display revision bars in the right-hand
margin alongside the data that has been changed since the previous
version.


If we limit ourselves to marking _blocks_ that way (and the approach you
describe implies such a limitation, too), it's fairly easy. Introduce a
class, say "chg", and use it for any changed block, e.g.
<p class="chg">Changed paragraph.</p>
or
<li class="chg">Changed list item</li>

In CSS, use e.g.

..chg { border-right: solid medium green; }

perhaps together with some right padding (to prevent text from hitting
the border) like

..chg { padding-right: 0.3em; }

In theory, you could use <ins> and <del> markup in HTML, but they imply
presentational idiosyncrasies (e.g., underlinking) that you would need
to fight against. Besides, they are really crappy markup for changes,
since they give no natural way for normal _changes_ (a paragraph
replaced by another one, for example).
Mar 14 '06 #4
Steve Pugh wrote:
Carolyn Marenger <ca****@marenger.com> wrote:
That is a good question. I haven't tried it, but I imagine you could
create a class for 'insert' and a class for 'delete'


Why? The ins and del elements are made for exactly that purpose.
and include not only the
styling for the text but also an image, vertical bar, in the left or right
margin.


Or specify border-right: 3px solid red; or similar? Why much about
with images?

Steve


Steve,

Why much about images? Simple. I didn't think of it. Your idea is a much
more elegant solution however.

Carolyn
--
Carolyn Marenger

Mar 14 '06 #5
Jukka K. Korpela wrote:
Ga******@gmail.com wrote:
The thing that has me stumped is that the
documents are required to display revision bars in the right-hand
margin alongside the data that has been changed since the previous
version.


If we limit ourselves to marking _blocks_ that way (and the approach you
describe implies such a limitation, too), it's fairly easy. Introduce a
class, say "chg", and use it for any changed block, e.g.
<p class="chg">Changed paragraph.</p>
or
<li class="chg">Changed list item</li>

In CSS, use e.g.

.chg { border-right: solid medium green; }

perhaps together with some right padding (to prevent text from hitting
the border) like

.chg { padding-right: 0.3em; }

In theory, you could use <ins> and <del> markup in HTML, but they imply
presentational idiosyncrasies (e.g., underlinking) that you would need
to fight against. Besides, they are really crappy markup for changes,
since they give no natural way for normal _changes_ (a paragraph
replaced by another one, for example).


Your solution is more elegant than mine was. I will however point out that
in any document revision control system that I have worked with, a strike
through denotes deleted text and underline denotes inserted text. Changed
text is denoted by striking through that which has been deleted and
underlining that which has been inserted in its place.

That works fine for content, but how does it work with styling or graphics?
Underlining does not always mean inserted. How do you strike through a
graphic?

Carolyn
--
Carolyn Marenger

Mar 14 '06 #6
The problem I have with displaying a right-hand border is that I have
to account for table rows. Sometimes, whole tables need a revision bar
- but most often, revision bars are required for only certain rows of a
table.

Mar 14 '06 #7
Tue, 14 Mar 2006 15:00:42 -0500 from Carolyn Marenger
<ca****@marenger.com>:
I haven't tried it, but I imagine you could create
a class for 'insert' and a class for 'delete' and include not only the
styling for the text but also an image, vertical bar, in the left or right
margin.


I was thinking along similar lines, but border-left or border-right
rather than an image.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Mar 14 '06 #8
Carolyn Marenger <ca****@marenger.com> wrote:
in any document revision control system that I have worked with, a strike
through denotes deleted text and underline denotes inserted text.
That explains the common default rendering in browsers for <del> and <ins>,
but my point was that the default rendering is a problem. First, you cannot
be sure of overriding it; CSS is by definition optional suggestions only.
Second, there is no simple way to say in CSS that you wish to override
whatever defaults a browser has for some elements and then start setting up
your own styling for them. Instead, you need to set different properties
explicitly to neutral values, and there are many properties in CSS (and many
of them _could_ be used in default styling).
Changed
text is denoted by striking through that which has been deleted and
underlining that which has been inserted in its place.


Yes, but that's rather unnatural for indicating small changes and creates the
problem that the old text appears as deleted, instead of simple indication of
change.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Mar 14 '06 #9
Ga******@gmail.com wrote:
I have a repository of aircraft technical documents that are converted
to HTML. The markup is incredibly ugly now because of the decision to
use table-based formatting. I'd like to remove everything from the
tables except, well, tables. The thing that has me stumped is that the
documents are required to display revision bars in the right-hand
margin alongside the data that has been changed since the previous
version. Of course, what was done was to add a narrow column to the
right and display the cell borders where necessary.

Does anyone know of a way to accomplish this same revision bar effect
with CSS instead of tables? Although sometimes there will need to be
revision bars to the right of particular rows of actual tables, in
addition to elements like paragraphs and list items.

I think this could be accomplished with Javascript, but I'd like to see
if there's a CSS-only solution to begin with.


G,

The last example at http://www.w3.org/TR/CSS21/visuren.html#q28 might
give you a starting point. <span> brackets the changed text and the
marker is floated left (but could as well be right).

Chris Beall

Mar 14 '06 #10
That was a very interesting and informative read. I'm not sure that it
takes me any closer, though. I've created a simplified example of the
problem here:

http://xnoubis.org/revbar.html

The revision bars are drawn vertically. I don't know in advance how
tall any of the revised rows will be. In a perfect world, I would be
able to style a TR element so that it drew a right border, say, 10
pixels to the right of its actual bounding box (sometimes in addition
to a regular right border, depending on the style of the table).

Mar 14 '06 #11

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

Similar topics

4
1899
by: Burghew | last post by:
Hi All, I have 2 fields called document & Revision which contains the titles for the documents to be stored in the databse it gets filled up as the user enters them and the revison numbers...
13
1804
by: IndianaJonesWB | last post by:
I have an Access Project as a front end for a SQL DB. I have a master copy and distribute copies of it to my other users. I would like to display a revision count on the first Main Form so that...
1
1660
by: windandwaves | last post by:
Hi Folk I am building an access application and one thing that I am having trouble with is menu bars, tool bars and other start-up procedures. What I want is hide all the menu bars and...
2
514
by: Mark | last post by:
In the AssemblyInfo.cs page of a ASP.NET project, there is a defaulted property of: It's my understanding that this indicates a Major Version of 1, a Minor Version of 0, and a Build and...
4
1471
by: Pietro | last post by:
Thanks for the last answer, but now how can i restart the count of the Build and Revision numbers of a dll in VS.Net. Thanks Pietro
4
4876
by: johnk | last post by:
I have a table of items, with revision numbers. I need to extract the items with highest revision number. The items may be listed several times and I don't know what the highest revision number...
2
2201
by: usenet | last post by:
When I open a form design window in Access 2003 it *always* has scroll bars, this is even when the form itself is tiny. It's as if the 'page' on which the form is being designed is very large. ...
6
1370
by: Jean-François Michaud | last post by:
Hello, I'm having trouble figuring something out. I have to reproduce a PDF output and in the original document, "revision indicators" are used to show which parts of the document have changed...
27
45487
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
0
7204
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
7091
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...
1
6998
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
7464
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
5586
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,...
1
5018
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...
0
4680
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...
0
1516
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.