Solved

Left Justify a Page

Posted on 2006-07-24
6
360 Views
Last Modified: 2010-04-06
Please can anyone tell me the best way to left justify a web page?  So that, the left edge of the page sits against the left edge of the screen (with 10px of padding).

Thanks!!

Ubee...
0
Comment
Question by:a466-ub52
  • 2
6 Comments
 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 250 total points
ID: 17166474
using just a little css, this can be done fairly easy:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Q_21929293.html</title>
<style type="text/css">
<!--
body,html {
margin:0px;
padding:0px;
padding-left:10px;
}
-->
</style>
</head>

<body>
<p>Hello, this text aligns directly to the top,<br>
and 10 px from the left.</p>
<hr>
<p>&nbsp; </p>
<div style="background-color:#00FF00;">
  <p>This div is also aligned 10px from the left,</p>
  <p>just like the &lt;hr&gt; above </p>
</div>
</body>
</html>
0
 
LVL 30

Expert Comment

by:callrs
ID: 17173597
Awesome dude. I gotta learn more CSS!
0
 
LVL 13

Expert Comment

by:Mark_FreeSoftware
ID: 17174557

this is not part of the Q,
but here are some tuts to get you started:

http://www.practicalpc.co.uk/webbuilding/design/css1.htm
http://www.wise-women.org/tutorials/csstut/

0
 
LVL 5

Assisted Solution

by:floorman67
floorman67 earned 250 total points
ID: 17177106
great solution for a few pages but if it is for jsut a single page you can do it with fewer keystrokes by adding this to the body tag

<BODY LEFTMARGIN=10>
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to dynamically load/unload User control in ASP.net page? 2 227
Clean URL from GET variables 2 118
Magento Indexing 1 112
Question on web subscription for apps 3 118
When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

713 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