Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Need Three Alignments For One Line Of Text


  • Please log in to reply

#1
magusbuckley

magusbuckley

    Member

  • Member
  • PipPipPip
  • 625 posts
Hello:

I've been fighting something this afternoon that, in my mind, should be quite easy to do. In fact, it probably is, I just don't know yet how to pull this off.


Imagine a document with your name on the left side of the page, your address in the center of the page, and your phone number on the right side of the page - all on the same line. Formatting of this sort is quite common on resume's and such.

At any rate, I can't find a way to have Dreamweaver set this up.

Any information you may have on this issue will be greatly appreciated.

Thanks,

Magus
  • 0

Advertisements


#2
AstraNut

AstraNut

    Member

  • Member
  • PipPipPip
  • 384 posts
Are you looking for something like this?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>Text - Aligned Left, Right and Center</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<p style="width: 90%;"><span style="float: left;">This text is aligned left</span> <span style="float: right;">while this text is aligned right!</span></p>

<div style="width: 800px; margin: 0 auto; border: 1px solid #f00;">
<p style="float: left;">This text is aligned left.</p><p style="float: right;">While this text is aligned right!</p>
<p style="text-align: center;">This text is centered.</p>


</div>
</body></html>

Edited by AstraNut, 06 July 2010 - 05:26 PM.

  • 0

#3
magusbuckley

magusbuckley

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 625 posts
AstraNut - Thanks for the reply. I haven't tried your solution yet, but glancing over your code, I think you've answered my question. I've been working on web pages, as a hobby mostly, for a few years now and have never worked with the span tag. I'll have to look that one up. Thanks for helping me on this. I already found a solution to this problem but knew there had to be a better way. I'm going to drop you code on a page soon and test it for myself.

Thanks!

Magus
  • 0

#4
AstraNut

AstraNut

    Member

  • Member
  • PipPipPip
  • 384 posts
You're welcome. That code is just one way to do it. Probably many more, but it was quick tio throw together. :) Good luck.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP