Drawing

Please anyone knows how to draw a line or a rectangle in HTML?
rabih_yassineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.