Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > HTML Programming

HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites.

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-30-2006, 01:42 AM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,478
Last Blog:
Joomla! And Incompeten...
Rep Power: 20
John has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond repute
Send a message via AIM to John Send a message via MSN to John
Default alignment

I really feel like a big n00b asking a question here...

But, without using tables is there a way you can align something to the left, center, and right (on the same line)? Basically I want to do this, without using tables do this:
Code:
<table width="100%" border="0">
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
I know I can easily go like this:
Code:
<div align="left">1</div>
to align the text to the left. However if i go
Code:
<div align="left">1</div>
<div align="center">2</div>
<div align="right">3</div>
It will be out puted like so:
Code:
1
                 2
                                  3
On different lines, and i cant have that
Something like this sort of works, but I sense there is a better solution
Code:
<div>
<span style="left: 0px; top: 0px; position: relative; z-index: 0;">1</span>
<span style="left: 50%; top: 0px; position: relative; z-index: 0;">2</span>
<span style="left: 90%; top: 0px; position: relative; z-index: 0;">3</span>
</div>
because depending how many characters "2" and "3" get depends if they are really aligned where they are suppose to be, so although its a solution, its not the answer im looking for.

Last edited by John; 12-30-2006 at 01:48 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!

Sponsored Links
  #2 (permalink)  
Old 12-30-2006, 02:34 AM
xtraze xtraze is offline
Programming God
 
Join Date: Dec 2006
Location: Sri lanka
Posts: 921
Rep Power: 0
xtraze is on a distinguished road
Send a message via MSN to xtraze Send a message via Skype™ to xtraze
Default

Thats some other way, but left: 90%; thing must be changed every time you type something or edit. And will it act same in all browsers ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3 (permalink)  
Old 12-30-2006, 11:37 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,651
Last Blog:
PHP Objects, Patterns,...
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

This forum uses that technique on the forum home for the right hand column. Here is the code:

HTML Code:
div#wrapleft {
background: url(http://forum.codecall.net/images/onlydev/misc/bkg_left.gif) repeat-y top left;
}

div#wrapright {
background: url(http://forum.codecall.net/images/onlydev/misc/bkg_right.gif) repeat-y top right;

}
View the source for more info about it.
</span>
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4 (permalink)  
Old 12-30-2006, 02:31 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,478
Last Blog:
Joomla! And Incompeten...
Rep Power: 20
John has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond repute
Send a message via AIM to John Send a message via MSN to John
Default

I ended up doing it like this

Code:
<style>
#container{width: 90%;}
#leftnav{float: left; width: 0px; margin: 0;}
#rightnav{ float: right; width: 0px; margin: 0;}
#content{margin-left: 0; border-left: 0px; margin-right: 0px; border-right: 0px;}
</style>

<div id="container">
<div id="leftnav">aaaaaaaa</div>
<div id="rightnav">cccccccc</div>
<div id="content"><div align="center">bbbbbbbbb</div></div>
</div>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5 (permalink)  
Old 12-31-2006, 06:25 AM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default

Why don't you want to use tables? I think it's simpler
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!

Sponsored Links
  #6 (permalink)  
Old 01-01-2007, 05:16 AM
xtraze xtraze is offline
Programming God
 
Join Date: Dec 2006
Location: Sri lanka
Posts: 921
Rep Power: 0
xtraze is on a distinguished road
Send a message via MSN to xtraze Send a message via Skype™ to xtraze
Default

Tables are really simple and Thank you for giving the Idea and I will try many of these and choose whats best for me. And everybody's needs are different, so, you may not like what I use ect. lol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 07:34 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads