Link to home
Start Free TrialLog in
Avatar of NDennisV
NDennisVFlag for United States of America

asked on

CSS loop through hotspots

I've been writing C# winforms program for years but I know very little about html and nothing about CSS. Now I find I need some help.

I'll need complete html/css source from top to bottom please.

I'm building part of a web page from within my winforms program at run time.

I should not need an Internet connection for this to work.

I'll have an array of x1,y1,x2,y2 coordinates for hot-spots on an image.

I need to set all these hot-spots in relation to an image that can be moved around. So, the hot-spots need to be in relation to the image's top/left corner.

I'll need to have some sort of a relationship so when the user clicks on a hot-spot I can take some action just for that one hot-spot.

Is CSS the best for this? I know some people do not allow JavaScript to run on their browsers.

I'm hoping someone very knowledgeable about HTML and CSS can write something for looping through just a few hot-spots for me in a few minutes (at least I hope so).

If this cannot be done in a loop then please just an example of a few hot-spots.

Thank you. Very much appreciated.
SOLUTION
Avatar of BAKADY
BAKADY
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NDennisV

ASKER

Thank you. No, the user cannot drag the image around but it can be moved up or down at design time.

I'll look up "html image map."
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Am I correct in assuming CSS is better than HTML?
you're wrong, they are different things and they need each other...

HTML suppose to be your content and CSS your style, css define how your content will be displayed -
Sorry, I meant for the hot-spot loops. Not overall.
i can help you with html and css, but i am not a java programer (i realized jet what hotspot mean, or you mean something else)...
regards
Using that site I mentioned above I've managed to get something working.

Thanks anyway.
I've requested that this question be closed as follows:

Accepted answer: 0 points for NDennisV's comment #a39244204

for the following reason:

Found it elsewhere.
Please look at followed posts
https://www.experts-exchange.com/questions/28155872/CSS-loop-through-hotspots.html?anchorAnswerId=39243074#a39243074
for the hot-spot/image you can use a image map in html.

https://www.experts-exchange.com/questions/28155872/CSS-loop-through-hotspots.html?anchorAnswerId=39243155#a39243155
I found this site: http://www.image-maps.com/ which gives me html and css.

https://www.experts-exchange.com/questions/28155872/CSS-loop-through-hotspots.html?anchorAnswerId=39244204#a39244204
Using that site I mentioned above I've managed to get something working.

As Expert a gave you a correct advice, thanks this you found a website which generate the code you need. I cann't know all sites in internet!!!

http://www.w3schools.com/ isn't old at old, it is a learning-plattform, there aren't final solutions just examples

NDennisV please reconsider your decision

Regards
(C) Question answered by one or more Expert comments

*why*
by the answer http:#a39243074 to the NDennisV's questions below
I'll have an array of x1,y1,x2,y2 coordinates for hot-spots on an image.

I need to set all these hot-spots in relation to an image that can be moved around. So, the hot-spots need to be in relation to the image's top/left corner.
i recomended the auth to use html image maps http:#a39243074 and i post a link to w3school http:#a39243131 for more information about and HTML references
He confirms that in his post http:#a39243155, he found a website that generate apropiate image map's html and css code.

Regards