Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

Drawing

Please anyone knows how to draw a line or a rectangle in HTML?
0
rabih_yassine
Asked:
rabih_yassine
2 Solutions
 
avnerCommented:
You can use a borderd div :

<DIV style="width:100px;height:100px;border:1px solid black;position:absolute;top:100px;left:100px"></DIV>
0
 
MusicManCommented:
If you just want to draw a horizontal line then use the following code:

<hr color="#FF0000"><hr align="center" width="90%" size="2">

Color is hex value - leave out for default
Align = left, center or right
Width is width of line as a %age of the screen
Size is line thickness.


MM
0
 
MusicManCommented:
Correction to above post...
Try
<hr align="center" width="90%" size="2" noshade color="#FF0000">

Remove noshade for a 3d effect

MM
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
drnCommented:
u could do the above but svg i believe would be a better choise
0
 
dr-mCommented:
<!-- 4x4 dot (blue) -->
<div style="overflow:hidden; width:4px; height:4px; background-color: blue;"></div>

<!-- small red line -->
<div style="overflow:hidden; width:100%; height:1px; background-color: red;"></div>
0
 
voskCommented:
Try with VML, that's not exactly html but you can use inside a web page. The direction to learn is http://www.microsoft.com/mind/0100/VML/VML.asp (thank's to COBOLdinosaur).
The only problem is that only works on MSIEv5.0, but with that language you can do a lot of things with few code (and also few things with a lot of code).
Hope that helps you.
jbosch(vosk)
0
 
hans_larsonCommented:
You could use the following for a rectangle.

You can remove the legend tags that prints in the rectangle.


==============================================



<HTML>
<BODY>
<FIELDSET>
<LEGEND><FONT SIZE=2>This is optional</FONT></LEGEND> <!-- Remove the legend tags if you want. -->
<BR>&nbsp;&nbsp;This placeholder text<BR><BR>
</FIELDSET>
</BODY>
</HTML>
0
 
alphaeternityCommented:
the best that i've seen is the fieldset as mentioned above...the coding goes as follows
<html>
<head><title>blah</title></head>
<body>
<TABLE width=xx>
<TD>
<fieldset>
<legend ACCESSKEY=A TABINDEX=2>TITLE</legend>
content goes here...
</fieldset>
</TD>
</TABLE>

this will give you a rectangle surrounding your content, with a break in the rectangle line for your title. kinda like..

|--  Title --------------------|
|                              |
|  content                     |
|______________________________|

it's a good effect.
0
 
COBOLdinosaurCommented:
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
COBOLdinosaurCommented:
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

<recommendation>
split avner and MusicMan

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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