Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 454
  • Last Modified:

HTML, how to shorten width

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
Los Angeles1
Asked:
Los Angeles1
  • 2
3 Solutions
 
AshokCommented:
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
 
AshokCommented:
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
 
bigeven2002Commented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now