Reply to Re: Really stupid newb question- <div>

Your name:

Reply:


Posted by Andy Dingley on 09/28/66 11:49

Jeremy Brown wrote:

> I have a "compass rose" on each of my pages that moves you around on the
> page (top or bottom) or site (previous or next page). To keep the "rose"
> separate from the preceding and upcoming sections, I have an empty <p></p>
> before the table that creates the "rose".

> <p>
> </p>

This is (almost) never a good idea. It's the web equivalent of the old
DTP tricks for spacing things out by putting empty whitespace elements
everywhere.

If you want [A} and [C] to be presented with some white space between
them, then use CSS and bigger margins (probably margin-top on [C]) to
set it. Don't create a [B] element just to sit between them - it's
just not needed.


> <table class="navbox">

I doubt you need to, nor should, use a table here -- but that's a
separate issue.

> <div>
> <table class="navbox">

This would probably have no effect at all.

Now it's possible that this is what you needed instead
<div class="navbox">
<table>

but in general, without having actually looked at your page, then you
can probably do it perfectly well like this
<table class="navbox">

<table> is already a block element and you have a class attribute on it
so you can attach most CSS that you might want. Unless you're doing
something paticularly complex, that's probably all the HTML you need.



In general, your markup wants an overall make-over. It's pretty much
1997 style, only in XHTML.

Lose the frames.
Lose the HTML 3.2 coding style.
Lose the Transitional doctype.
Lose the <table>s
Lose the rainbow bullets.
Lose the frames.

The XHTML is OK, although many people will proceed to tell you it's
wrong. It's not helping much, but it doesn't actually hurt.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация