Solved

Left Justify a Page

Posted on 2006-07-24
6
354 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

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

Suggested Solutions

Title # Comments Views Activity
Problem with Connection / Parameter: 4 21
TripAdvisor Widgets on WordPress Websites 10 108
What is the normal amount of queries 5 74
Question on web subscription for apps 3 92
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

867 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

17 Experts available now in Live!

Get 1:1 Help Now