![]() |
Aligning text
This is just about as noobie of a question as it gets... I want to create text so that some is on the left and some is on the right of the same line. Eventually, I'll be making them links to the previous and next pages of a manual-type document. This is what I tried to do:
:
<HR><H3>It turned out so that they were on the left and right sides, though the "Next >>" text was one line below the "<< previous" text. I'm just learning to code HTML and so far have just read "Learning HTML in 14 days" (written in 1997, which I wish I would have realized sooner...) so any advice on references of what has happened to HTML in the past decade would be of help to me. (Will move up to DHTML after I get a bit of practice with HTML.) |
<div>s are block level elements, hence the line break.
Use <span>s and float them. :
<hr />Quote:
of HTML and JavaScript to make annoying and distracting things happen on the page - It is XHTML you should be learning. ;) There are plenty of resources out there. Just google for 'HTML Tutorials' or something. w3Schools is, as always, a good place to start. Here's some links you might find useful: http://www.w3.org/QA/2002/04/valid-dtd-list.html http://validator.w3.org/ http://www.westciv.com/style_master/...l/dead_layout/ http://www.hotdesign.com/seybold/index.html http://www.w3schools.com/css/default.asp http://glish.com/css/ http://www.bluerobot.com/web/layouts...horizdropdowns http://www.quirksmode.org/css/condcom.html |
The <span> tag works. Thank you. :) <span> was never mentioned in the '97 book, but I'll be looking it up along with the references you suggested. So thanks again.
|
Dump the '97 book. The web's moved on to XHTML/CSS.
I recommend W3schools, it's where I learned. By the way, is there a way to get text in the middle of that line without assuming the font-size on the browser is a typical font size? |
Just apply text-align to the <h3>
:
<hr /> |
Here's another way though not as efficient I suspect.
:
<HR><H3> |
It's got nothing to do with efficiency, grim. Tables are for displaying
tabular data. What about this data is tabular? |
Absolutely nothing, I use tables as a grid-like interface for visual formatting, not just for tabular data. I concur that you are correct though, in the strictest sense, tables are exclusively for tabular data. However, my pirate creed forces me to use and abuse all HTML tags at my whimsy ahahahaha. Just check my website for an example *_*
|
| All times are GMT -5. The time now is 1:04 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC