?
Solved

Drawing

Posted on 2003-03-26
10
Medium Priority
?
369 Views
Last Modified: 2010-04-09
Please anyone knows how to draw a line or a rectangle in HTML?
0
Comment
Question by:rabih_yassine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 14

Accepted Solution

by:
avner earned 500 total points
ID: 8209979
You can use a borderd div :

<DIV style="width:100px;height:100px;border:1px solid black;position:absolute;top:100px;left:100px"></DIV>
0
 
LVL 8

Assisted Solution

by:MusicMan
MusicMan earned 500 total points
ID: 8210210
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
 
LVL 8

Expert Comment

by:MusicMan
ID: 8210220
Correction to above post...
Try
<hr align="center" width="90%" size="2" noshade color="#FF0000">

Remove noshade for a 3d effect

MM
0
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

 
LVL 1

Expert Comment

by:drn
ID: 8210225
u could do the above but svg i believe would be a better choise
0
 

Expert Comment

by:dr-m
ID: 8210309
<!-- 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
 
LVL 3

Expert Comment

by:vosk
ID: 8210517
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
 
LVL 3

Expert Comment

by:hans_larson
ID: 8215470
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
 

Expert Comment

by:alphaeternity
ID: 8233332
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8820608
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9015942
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

762 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