The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

i need someone Explain me how coords code works

View previous topic View next topic Go down

Solved i need someone Explain me how coords code works

Post by Michael_vx on July 10th 2015, 12:31 am

i need someone Explain me how coords code works
i tried to understand what is that by search and i find these
any way my problem is i have an mapped image with a little wrong Positions
the code of what i have is like this
Code:
<area alt="" coords="67, 19, 85, 34"
the most confusing thing in that its my first time to use such a thing named coords or image map i need an explain with more easy way so i can find out how to fix the code i have
what i find:
RectangleThis expects four coordinates. The horizontal position of the top-left corner, the vertical position (from the top of the image) of the top-left corner, the horizontal position of the bottom-right corner and the vertical position of the bottom-right corner. An example would be:
Code:
shape="rect" coords="10,20,75,40"
CircleThis expects three coordinates. The horizontal position of the centre, the vertical position of the centre and the radius of the circle (percentage radii are taken as a percentage of the shorter side of the image). An example would be:
Code:
shape="circle" coords="50,80,20"
PolygonThis expects as many pairs of coordinates as you need to make your polygon. These can make any polygon shapes you need, and can have sloping lines. All coordinates are specified as horizontal position then vertical position, with all of them in a long comma separated list. The last pair of coordinates can optionally match the first. An example would be:
Code:
shape="poly" coords="217,305,218,306,218,306,228,316,243,316,243,325,229,325,229,322,217,310"

If any of these areas overlap, the one that is defined first will be used in the places where they overlap. There is also a "default" shape, which covers the entire image, and does not need the coords attribute. However, I advise you not to use this shape, as it makes it impossible for a user to know when they are over a proper area, since the mouse cursor will always show as an area link.
It is possible to use an AREA to puch a hole out of another one. Instead of giving it an HREF attribute, set the NOHREF attribute (without giving it a value). Then make sure that it appears before the other area in the source code, and it will be placed on top of it, as a dead space where the other area will not react.
Remember that every area must have an ALT attribute giving the alternative text to display. For areas with no HREF, it is best to provide an empty ALT attribute. If you use A elements instead, these cannot have an ALT attribute, but browsers can use their contents instead. I also recommend giving every area a TITLE attribute, that most browsers will display as a tooltip when hovering the area. This makes it much more easy to see what the area represents.


Last edited by Michael_vx on July 10th 2015, 2:04 am; edited 1 time in total

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by SLGray on July 10th 2015, 12:49 am

What are you trying to do?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by Michael_vx on July 10th 2015, 1:00 am


at the image i made 2 lines in the first line is what the buttons are the 2nd line is where the clicks works other word when i click on the space next to the red box i get the red button the red gives the blue the violet give the 2nd blue the green gives the yellow in actual clicks not same as the colors shows in the box
i hope i Explained my problem well

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by SLGray on July 10th 2015, 1:03 am

Sounds like coords is referring to coordinates of a shape like a triangle.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by Michael_vx on July 10th 2015, 1:08 am

What the fuck ?!?
im not sure if you got what im trying to say
what i need to fit the actual clicking area with the colors appears in the image at the first line the 2nd line im showing with it the actual clicks goes
the code is
Code:
<area alt="" coords="67, 19, 85, 34"
i want to understand
the number 67 control which way and 19 which way etc with 85 and 34 so i can refit the actual clicks to fit the colors

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by SLGray on July 10th 2015, 1:13 am

Is there a reason why you have two " at the beginning?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by Michael_vx on July 10th 2015, 1:25 am

tow of what if you referring to the image i provide then you got the wrong idea Very Happy
its 1 line i added a copy of the same line to Explain where the actual clicks goes at the 1st line nothing more
i think i made you confused sorry

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by SLGray on July 10th 2015, 1:44 am

Code:
<area alt="" coords="67, 19, 85, 34"
After alt=


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by Michael_vx on July 10th 2015, 1:55 am

why i`m not good in Explain things Sad
Code:
  <map id="Color" name="Color">
  <area alt="" coords="146, 18, 162, 35" href="javascript:chooseStyle('BdCo1',60)" shape="rect" target="_self" title="الأحمر" />
  <area alt="" coords="125, 19, 143, 35" href="javascript:chooseStyle('BdCo2',60)" shape="rect" target="_self" title="الأزرق" />
  <area alt="" coords="107, 19, 123, 35" href="javascript:chooseStyle('BdCo3',60)" shape="rect" target="_self" title="الموف" />
  <area alt="" coords="88, 19, 105, 36" href="javascript:chooseStyle('BdCo4',60)" shape="rect" target="_self" title="الفيروزي" />
  <area alt="" coords="67, 19, 85, 34" href="javascript:chooseStyle('BdCo5',60)" shape="rect" target="_self" title="الأخضر" />
  <area alt="" coords="46, 19, 66, 35" href="javascript:chooseStyle('BdCo6',60)" shape="rect" target="_self" title="البرتقالي" />
  </map>
as far as i know this part should control where the buttons on the image

but the buttons start from the green box and the red button area is the empty space right after the red box
i mean the buttons commands are not in the right positions like the boxes in the image they are 1 block to the right
Edit ----------------------------------------------------
never mind i tried by luck and i get what i want
it was the first and the 3rd numbers
"this, 18, this, 35"
which was taking the control of the place of the actual buttons
sorry for bothering you and any one tried to understand my request
close the topic if you like

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i need someone Explain me how coords code works

Post by SLGray on July 10th 2015, 2:07 am

Thanks for posting the solution.

Topic solved and archived


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum