Solved

HTML, how to shorten width

Posted on 2012-04-12
3
442 Views
Last Modified: 2012-04-12
I have the following code:

<html>
<body>
<hr />
<p>Line 1<br />
Line 2<br />
Line 3<br />
<a href="http://www.google.com">
This is a link</a>
</p>
<hr />
</body>
</html>

Open in new window


Notice the horizontal lines

I would like to shorten the width of this to around 30 percent of the page (or maybe just slightly longer than the longest line

How would I do that

Thanks
0
Comment
Question by:Los Angeles1
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Ashok earned 334 total points
Comment Utility
Try

<html>
<body>
<hr width='70%'/>
<p>Line 1<br />
Line 2<br />
Line 3<br />
<a href="http://www.google.com">
This is a link</a>
</p>
<hr width='70%'/>
</body>
</html>

HTH
Ashok
0
 
LVL 13

Assisted Solution

by:Ashok
Ashok earned 334 total points
Comment Utility
If you want to align hr to left, use

<html>
<body>
<hr width='70%' align='left'/>
<p>Line 1<br />
Line 2<br />
Line 3<br />
<a href="http://www.google.com">
This is a link</a>
</p>
<hr width='70%' align='left'/>
</body>
</html>

HTH
Ashok
0
 
LVL 17

Assisted Solution

by:bigeven2002
bigeven2002 earned 166 total points
Comment Utility
Just to clarify, are you wanting to reduce the <hr> by 30% or making it only 30% long.  If the former, then Ashok's solution should work, otherwise change it to
<hr width="30%" />

Open in new window

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration, of the HP EVA 4400 SAN Storage. The name , IP and the WWN ID’s used here are not the real ones. ABOUT THE STORAGE For most of you reading this, you …
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now