473,657 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Excellent CSS debugging technique

I found an excellent technique in "Eric Meyers on CSS" that I thought
some of you might be interested in.

The technique is to use "debugging" styles to quickly see the layout
of a page. For example, if you are trying to see the layout of a
table-based HTML form (to convert to CSS, of cource ;) ), you would
add the style:

table { border : 2px solid blue;}

I have also used this method to find out where browsers are placing my
DIV's and SPAN's. Overall, I thought it was a great idea. Does
anyone else us it regularly?
Jul 20 '05 #1
12 2874


Trent wrote:
I found an excellent technique in "Eric Meyers on CSS" that I thought
some of you might be interested in.

The technique is to use "debugging" styles to quickly see the layout
of a page. For example, if you are trying to see the layout of a
table-based HTML form (to convert to CSS, of cource ;) ), you would
add the style:

table { border : 2px solid blue;}

I have also used this method to find out where browsers are placing my
DIV's and SPAN's. Overall, I thought it was a great idea. Does
anyone else us it regularly?


Well, Mozilla has the DOM inspector which highlights nodes with a red
border.
And Opera 7 has nice debugging style sheets, try
View->Style->User Mode->Show structural elements/debug with outline
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
"Trent" <sp*******@marx 7.org> wrote in message
news:22******** *************** ***@posting.goo gle.com...
I found an excellent technique in "Eric Meyers on CSS" that I thought
some of you might be interested in.

The technique is to use "debugging" styles ... .... table { border : 2px solid blue;}

...Does anyone else us it regularly?


Only when I am having a problem with a
layout (i.e. every other day).

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Jul 20 '05 #3
Trent wrote:
I found an excellent technique in "Eric Meyers on CSS" that I thought
some of you might be interested in.

The technique is to use "debugging" styles to quickly see the layout
of a page. For example, if you are trying to see the layout of a
table-based HTML form (to convert to CSS, of cource ;) ), you would
add the style:

table { border : 2px solid blue;}

I have also used this method to find out where browsers are placing my
DIV's and SPAN's. Overall, I thought it was a great idea. Does
anyone else us it regularly?


Yes. There are at least 2 different ways:

1. Put extra features like that into the CSSs while you are developing. (I use
both border & background-color for that). If you keep them blocked together,
you can "comment them out" when they are OK, leaving them there for easy
switch-on later.

2. Use the Web Developer's toolbar that you can add to Mozilla Firebird. It
has a *large* array of such debugging features built in that you can switch on
and off for any pages. It is very "voyeuristi c" being able to see at a glance
what tables & headers, etc, *someone else's* web site is using! (Other
browsers have such tools, but this is the best I've found).
http://texturizer.net/firebird/extensions/#webdeveloper

I still often browse the web using IE with a local CSS (set with the
"accessibil ity" menu), although I use:
table { border: 1px dotted blue; }
It tells me just how many layout-tables exist across the web!

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #4
Trent wrote:
I found an excellent technique in "Eric Meyers on CSS" that I thought
some of you might be interested in.

The technique is to use "debugging" styles to quickly see the layout
of a page. For example, if you are trying to see the layout of a
table-based HTML form (to convert to CSS, of cource ;) ), you would
add the style:

table { border : 2px solid blue;}

I have also used this method to find out where browsers are placing my
DIV's and SPAN's. Overall, I thought it was a great idea. Does
anyone else us it regularly?


I have a user-stylesheet like that. Mostly, my own tables are not that
complex. But tables of pages someone else did tend to use some quite
heavy table layout. Added to what you do above I do something like:

td { border: 1px solid red; }
td td { border: 1px solid green; }
td td td { border: 1px solid yellow; }

etc. you get the idea

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #5
Trent wrote:
I found an excellent technique in "Eric Meyers on CSS" that I thought
some of you might be interested in.

The technique is to use "debugging" styles to quickly see the layout
of a page. For example, if you are trying to see the layout of a
table-based HTML form (to convert to CSS, of cource ;) ), you would
add the style:

table { border : 2px solid blue;}


Unlike border, outline does not affect the layout, so that would be the
preferred option. But the whole trick is silly, it's much better to have
the UA apply this (as is possible with Opera).

--
Spartanicus
Jul 20 '05 #6
Spartanicus <me@privacy.net > wrote in message news:<sn******* *************** **********@news .spartanicus.ut vinternet.ie>.. .
But the whole trick is silly, it's much better to have
the UA apply this (as is possible with Opera).


I haven't found a way of getting IE to do it. (Haven't really look,
honestly). I usually have about 3 different browsers open and test
code as I go along, so adding the debugging styles is a quick
across-the-board way of seeing results.
Jul 20 '05 #7
On Mon, 15 Dec 2003, Spartanicus wrote:
table { border : 2px solid blue;}
Unlike border, outline does not affect the layout, so that would be the
preferred option.


It's been my experience (though, hopefully, these problems will go
away with time) that some of the worse browsers actually get better
results when a border is defined. So there can be some advantages in
defining the border as, for example, 2px solid during this stage of
development, even if none is wanted in the finished product, and then
switching it to 2px none, so that it's still there (and stabilising
the presentation in NN4 and such), but becomes invisible.
But the whole trick is silly, it's much better to have
the UA apply this (as is possible with Opera).


With the greatest of respect: if we're trying to get improved results
across many browsers, then we need a construction technique which does
its job on those browsers. If we only wanted CSS to work on browsers
whose implementation meets our minimum demands, then there are
techniques available for hiding the CSS from the rest, and then they'd
just have to make do with their browser's inherent rendering of HTML.
But as long as we're trying to get _some_ kind of sense out of NN4.*
and IE-whatever-version (and WebTV if you're a masochist), we need
design techniquest which work with those. I think the border trick is
useful - I even wrote a page about it, but as I'm only a dabbler in
this, really, I'll defer to Eric Meyers.

Jul 20 '05 #8
Trent wrote:

table { border : 2px solid blue;}

I have also used this method to find out where browsers are placing my
DIV's and SPAN's. Overall, I thought it was a great idea. Does
anyone else us it regularly?


<snobbish voice> I was doing that before I knew what CSS *was*, and I'm
just a dallying novice ;)</snobbish voice>

Jul 20 '05 #9
Alan J. Flavell wrote:
But the whole trick is silly, it's much better to have
the UA apply this (as is possible with Opera).


With the greatest of respect: if we're trying to get improved results
across many browsers, then we need a construction technique which does
its job on those browsers. If we only wanted CSS to work on browsers
whose implementation meets our minimum demands, then there are
techniques available for hiding the CSS from the rest, and then they'd
just have to make do with their browser's inherent rendering of HTML.
But as long as we're trying to get _some_ kind of sense out of NN4.*
and IE-whatever-version (and WebTV if you're a masochist), we need
design techniquest which work with those. I think the border trick is
useful - I even wrote a page about it, but as I'm only a dabbler in
this, really, I'll defer to Eric Meyers.


The proposed usage was as a *debugging technique*, this can be done
using the most advanced UA if you take the limitations of other UA's
into account. As a final step the code can then be ruggedized to work in
less capable clients.

Your assumption that "we" are trying, or even should be trying to get
any CSS to work in NS4 is out of step with reality.

--
Spartanicus
Jul 20 '05 #10

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

Similar topics

16
2855
by: Java script Dude | last post by:
To all Mozilla JS Guru's (IE dudes welcome), I have spent the last three years developing complex DHTML applications that must work in IE 5.5sp2+ but I use Mozilla 1.3+** to do all my development. I have build some cross browser debuggers so my users can send me verbose debug dumps. I have some success but have come to a roadblock with the basic underlying JavaScript models. The only way to get a complete stack in IE is to use the...
5
7794
by: phnimx | last post by:
Hi , We have developed a number of plug-in .NET Library Components that we typically deploy with our various applications by installing them into the GAC. Each of the applications contains an app.config file referencing arbitrary versions of the plug-in components they wish to consume. Here's the problem: Assuming I have installed any one of our application software,
4
3200
by: yuanliu1 | last post by:
Hi, I am debugging my code of visual c++ 6.0. I found it is extremely slow to run after the code is compiled as "debug" mode and OK as "release mode", I would say the difference is around 10x. But I am developing and mainly working on "debug" mode, it is very clumsy to wait for 10 mins for just one run. I did a check and I suppose it is related to the heap check in "debug" mode, so I am wondering if I can turn it off in visual c++ 6.0...
0
1935
by: mandarkraftware | last post by:
Hi All, Let me present you with list of consultants currently available. Name / Job Title Summary Ramchandran/Java · 7+ years experience in the field of Software Development. · Expertise in full Software Development Life Cycle (SDLC)
1
1791
by: Sachin | last post by:
Hi All, Let me present you with list of consultants currently available. Name / Job Title Summary Ramchandran/Java · 7+ years experience in the field of Software Development. · Expertise in full Software Development Life Cycle (SDLC)
4
3609
by: John Wilmot | last post by:
I have a service that is set up to use remoting. Is there a way that calls from a web page to this service can be debugged in Visual Studio 2005?
3
2217
by: SteveD | last post by:
Hi guys, http://luaforge.net/frs/?group_id=327 pgdb.zip is an addition to scite-debug, which adds source debugging to the popular SciTE programmer's editor. gdbpy.zip is a standalone version which can be run from Emacs. These allow you to single-step from Python to C code in a debugger session.
6
28866
kenobewan
by: kenobewan | last post by:
Congratulations! You are one of the few who realise that over 80% of errors are simple and easy to fix. It is important to realise this as it can save a lot of time. Time that could be wasted making unnecessary changes, that in turn can cause further problems. Programming is a humbling experience. An experience that causes one to reflect on human error. One major cause of these errors is syntax, syntax, syntax. We tend not to notice when we...
0
8407
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8512
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
8612
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...
1
6175
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
5638
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
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
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 we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
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.