Solved

HTML table not aligning

Posted on 2011-02-24
4
309 Views
Last Modified: 2012-05-11
Hello,

Please see the two files below, my issue is that the text Oobie should be aligned to the right hand side of the cell but this is failing to happen.

Thanks.
Uni
<html>

	<head>
		<title>My Title</title>
		<link rel="stylesheet" type="text/css" href="styles.css" />
	</head>

	<body>
	
		<table class="FullWidth FullHeight BigPadding">
			<tr>
				<td class="FullWidth StandardBlackBorder SmallPadding" align="right">Oobie</td>
			</tr>
		</table>
		
	</body>
	
</html>

Open in new window

html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}:focus{outline:0;}body{line-height:1;color:black;background:white;}ol,ul{list-style:none;}table{border-collapse:separate;border-spacing:0;}caption,th,td{text-align:left;font-weight:normal;}blockquote:before,blockquote:after,q:before,q:after{content:"";}blockquote,q{quotes:"""";}


body{
	background-image:url('verticalgradient.jpg');
	background-repeat:repeat-x;
	background-color:white;
}


.FullWidth{ width:100%; }
.FullHeight{ height:100%; }
.BigPadding{ padding:20px; }
.SmallPadding{ padding:5px; }
.StandardBlackBorder{ border-style:solid; border-color:black; border-spacing:0px; border-width:1px; }

Open in new window

0
Comment
Question by:Unimatrix_001
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Ultra_Master earned 250 total points
ID: 34972676
Use the following code instead:
<html>

	<head>
		<title>My Title</title>
		<link rel="stylesheet" type="text/css" href="styles.css" />
	</head>

	<body>
	
		<table class="FullWidth FullHeight BigPadding">
			<tr>
				<td class="FullWidth StandardBlackBorder SmallPadding" style="{text-align:right;}">Oobie</td>
			</tr>
		</table>
		
	</body>
	
</html>

Open in new window

0
 
LVL 28

Assisted Solution

by:sammySeltzer
sammySeltzer earned 250 total points
ID: 34972682
well,
it seems aligned, way too aligned to the right to me.

see screenshot
right.GIF
0
 
LVL 3

Author Closing Comment

by:Unimatrix_001
ID: 34972731
This appears to be a FF issue... Thank you. :)
0
 
LVL 5

Expert Comment

by:Ultra_Master
ID: 34972737
This is because you used Internet Explorer. In Opera and Firefox it doesn't work and possible in many others. The approach suggested by me should work on most browsers.

Cheers,
UltraMaster
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now