LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2006, 07:38 PM   #1
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Rep: Reputation: 30
HTML help, not centering


I know, HTML isn't programing, but it's close enough.

The text isn't centering. You can render it and see for yourself.
[HTML]<html>
<head>
<title>Start a Revolution - Home</title>
<meta name="Author" content="Start a Revolution Crew.">
<meta name="Description" content="It's time to start a revolution!">
<meta name="KeyWords" content="revolution, hack, computers, politics, anarchy, freedom, free, peace, equality, poverty, racist, religion, war, america, bush, 9/11, ">
<style type="text/css">
h1 {text-align: center}
h1 {color: #000000}
h1 {font-size: 70%}

h2 {text-align: center}
h2 {color: #000000}
h2 {font-size: 70%}

h3 {text-align: center}
h3 {color: #000000}
h3 {font-size: 70%}
</style>
</head>
<body>
<body bgcolor="#000000">
<center>
<table id="shell" title="Shell" height="10" width="780"
border="0" bgcolor="black" cellspacing="1" cellpadding="0">
<tr height="50">
<td bgcolor="white">
<table title="banner" id="banner">
<tr>
<td>
<h1>
<div style="text-align:center;">
<img src="images/head.png">
</div>
</h1>
</td>
</tr>
</table>
</td>
</tr>
<tr height="25">
<td bgcolor="white">
<table title="quotes" id="quotes">
<tr>
<td>
<h2>
<div align="center">
<font face="courier 10 pitch" size="2">
<SCRIPT>
quote0= "Lets start a revolution.";
quote1= "Come take my hand on the path that sets us free.";
quote2= "Does the rich decide how much we get? It's defentially not the poor. ~ Zearle";
quote3= "The only reason George Washington was liked so much is becuase he never blamed his problems on previous leaders.";
quote4= "Freedom is the freedom to say 2+2=4. After that, all else follows. ~ 1984 by George Orwell";
quote5= "A real soldier fights the system. ~ Zearle";
quote6= "Those who give up freedom for saftey deserve neither. ~ Ben Franklin";
quote7= "Freedom is an internal right, someone can't give it to you. Why did they make us fight for what we already have?";
quote8= "America was founded so they wouldn't have to pay taxes.";
quote9= "You think all those little cameras are for traffic control, don't you?";
quote10= "You can't solve a problem with the same thinking that created it ~ Albert Enstien";
quote11= "It's not who votes that counts, it's who counts the votes! ~ Josef Stalin";
quote12= "A man who stands for nothing will fall for anything. ~ Malcolm X";
quote13= "Unthinking respect for authority is the greatest enemy of truth. ~ Albert Enstien";
quote14= "There are only two things that are endless, the universe, and the human's stupidity. ~ Albert Enstien";
quote15= "If you want peace, work for justice"
quote16= "Never doubt that a small group of thoughtfull committed citizens can change the world: Indeed, it's the only thing that ever has. ~ Margaret Head";
quote17= "Only when the last tree has died, the last river has been poisoned, and the last fish has been caught, we will realize that we can not eat money. ~ 19th Century Cree Indian";
quote18= "The most potent weapon in the hands of the oppressor is the mind of the oppressed ~ Steve Biko";
quote19= "We belong to each other, we belong to our time, pushing relentlessly to reshape the world to our vision";
quote20= "Mass media breeds mass deception";
quote21= "Defend the constitution; Repeal the patriot act.";
quote22= "The important thing is to not stop questioning ~ Albert Enstein";
quote23= "Beware of the new world order";
quote24= "Adolf; Bush; If history repeats itself, will we notice?";
quote25= "9/11; Ask questions - Demand Answers";
quote26= "Fear not the path of truth for the lack of people walking on it. ~ JFK";
quote27= "Anyone who has the power to make you believe absurdities has the power to make you commit injustices. - Voltaire";
quote28= "During times of universal deceit, telling the truth becomes a revolutionary act. ~ George Orwell";
quote29= "The people who are crazy enough to think they can change the world are the ones that do.";
quote30= "It is horrifying to think that we have to fight our own government to save the environment. ~ Ansel Adams";
quote31= "Saying you're not discriminative or racist isn't the solution. Not noticing a difference is the solution.";
quote32= "I offer my opponents a bargain: if they will stop telling lies about us, I will stop telling the truth about them. ~ Adlai Stevenson";
quote33= "Democracy consists of choosing your dictators, after they've told you what you think it is you want to hear. ~ Alan Coren";
quote34= "If voting changed anything, they'd make it illegal. ~ Emma Goldman";
quote35= "Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule - and both commonly succeed, and are right. ~ H.L. Mencken";
quote36= "In a society that abolishes adventure, the only adventure is in abolishing society.";
quote37= "No freedom for the enemies of freedom.";
quote38= "It is only after you have lost everything when you are free to do anything.";
quote39= "During a campaign the air is full of speeches - and vice versa.";
quote40= "Forget everything you've been taught. Start by dreaming.";
quote41= "Justice will only exist where those not affected by injustice are filled with the same amount of indignation as those offended. ~ Plato";
quote42= "Do you ever get the feeling that the only reason we have elections is to find out if the polls were right? ~ Robert Orben";
quote43= "Politicians are like diapers. They both need changing regularly and for the same reason.";
quote44= "The nationalist not only does not disapprove of atrocities committed by his own side, but he has a remarkable capacity for not even hearing about them. ~ George Orwell";
quote45= "When I was a boy I was told that anybody could become President; I'm beginning to believe it. ~ Clarence Darrow";
quote46= "Idleness is the failure of any revolution.";
quote47= "When one may pay out over two million dollars to presidential and Congressional compaigns, the U.S. government is virtually up for sale. ~ John Gardner";
quote48= "The destruction of boundries is the first step to world peace.";


var ran_unrounded=Math.random()*48;
var ran_number=Math.round(ran_unrounded);

document.write(eval("quote"+ran_number));
</SCRIPT>
</font>
</div>
</h2>
</td>
</tr>
</table>
</td>
</tr>
<tr height="25">
<td bgcolor="white">
<table title="navigation" id="navigation">
<h3>
<tr>
<td>
<font face="courier 10 pitch">
<div align="center">
| Home | News | Staff | Political | Computers |
</div>
</font>
</td>
</tr>
</h3>
</table>
</td>
</tr>
<tr>
<td bgcolor="white">
<table title="Content" id="content">
<tr>
<td>
Content goes here
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</body>
</html>
[/HTML]
Any ideas?
 
Old 12-16-2006, 09:00 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
You may need this;
Code:
 <style type="text/css">
      h1 {text-align: center}
      h1 {color: #000000}
      h1 {font-size: 70%}

      h2 {text-align: center}
      h2 {color: #000000}
      h2 {font-size: 70%}

      h3 {text-align: center}
      h3 {color: #000000}
      h3 {font-size: 70%}
      body {text-align: center}
</style>
 
Old 12-16-2006, 10:58 PM   #3
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Original Poster
Rep: Reputation: 30
But I don't want EVERYTHING in <body></body> centered.
 
Old 12-16-2006, 11:19 PM   #4
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Rep: Reputation: 31
Not sure WHAT you want centered, but if it's your nav bar, add an 'align="center"' attribute to the table cell tag just before the '<table title="navigation" id="navigation">' tag.
 
Old 12-17-2006, 03:37 AM   #5
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
Try some css;
http://www.w3.org/TR/html4/present/graphics.html
 
Old 12-17-2006, 06:06 AM   #6
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
Has anyone told you tables for layout is a bad idea?
 
Old 12-17-2006, 12:36 PM   #7
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by introuble
Has anyone told you tables for layout is a bad idea?
No, what do you recomend?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tk: Centering a Window Kenji Miyamoto Programming 0 06-25-2005 04:30 PM
monitor screen centering issues timsch75 Linux - General 6 03-11-2005 11:39 PM
Centering monitor Djony Linux - Hardware 3 01-29-2004 06:49 PM
WindowMaker and centering backgrounds PapaNoHair Linux - General 1 07-28-2003 11:59 AM
Gnome 2.2 and centering apps PapaNoHair Linux - General 0 07-20-2003 04:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration