Solved

Left Justify a Page

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
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.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

705 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

18 Experts available now in Live!

Get 1:1 Help Now