Jump to content

Drawing a line


voip03

Recommended Posts

you can draw lines with html5 canvas. With css, you require a background image (and than position it so it just touches the 'o') if you want to come close to what you have in your attachment. otherwise text-decoration or border-bottom could work, but that would create a greater gap.

Link to comment
https://forums.phpfreaks.com/topic/246483-drawing-a-line/#findComment-1265708
Share on other sites

Oh i just played abit with css3 boxshadow and that is a possibility too, it seems. try it:


<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
.line {
    box-shadow: 0 3px 1px -3px #000;
    display: inline-block;
    line-height: 10px;
    width: 50%;
}
    
</style>
</head>
<body>
    g<span class="line">o</span>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/246483-drawing-a-line/#findComment-1265712
Share on other sites

  • 2 weeks later...

You can try it out with <hr>.

 

I tried it. Not so neat but u can play with a bit of css ;D

 

<html>
<head>
<title></title>

<style type="text/css">
.left {
  position:absolute;
  top:15px;
  left:25px;	
width: 15%;
}
.go
{
width:20px;
   float:left;
}
    
</style>
</head>
<body>
   <div class="go"> go</div>
<div  class="left"><hr></div>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/246483-drawing-a-line/#findComment-1270186
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.