6 Replies - 571 Views - Last Post: 15 March 2012 - 10:04 PM

#1 black_yurizan  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 89
  • Joined: 18-June 11

Cannot get border over picture

Posted 15 March 2012 - 05:29 AM

This should work right?

<script>
document.pic.style.border="solid black 3px";
</script>

<div name="pic">
<img src="neon.jpg"/>
</div>




I think this should work, I mean; it suppose to be pretty simple. But, it's not working any suggestions?
Is This A Good Question/Topic? 0
  • +

Replies To: Cannot get border over picture

#2 strawhat89  Icon User is offline

  • The Watcher Outside Your Window


Reputation: 247
  • View blog
  • Posts: 1,795
  • Joined: 11-July 11

Re: Cannot get border over picture

Posted 15 March 2012 - 05:37 AM

how about using

<img src="neon.jpg" border = "3px" />



thats what I usually do..
Was This Post Helpful? 0
  • +
  • -

#3 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3576
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: Cannot get border over picture

Posted 15 March 2012 - 05:59 AM

if you're writing it in that order ... no. (element not available yet)

@strawhat89: the border attribute is a) deprecated and b) does not use a unit (you pass a number which is the border width in pixel)
Was This Post Helpful? 0
  • +
  • -

#4 black_yurizan  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 89
  • Joined: 18-June 11

Re: Cannot get border over picture

Posted 15 March 2012 - 06:08 AM

I put the script below the picture and it still doesn't give the picture a border
Was This Post Helpful? 0
  • +
  • -

#5 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3576
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: Cannot get border over picture

Posted 15 March 2012 - 06:44 AM

why should it? <div>s do not have names and your image doesn't have one either.
Was This Post Helpful? 2
  • +
  • -

#6 black_yurizan  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 89
  • Joined: 18-June 11

Re: Cannot get border over picture

Posted 15 March 2012 - 09:38 AM

Thanks, it worked
Was This Post Helpful? 0
  • +
  • -

#7 strawhat89  Icon User is offline

  • The Watcher Outside Your Window


Reputation: 247
  • View blog
  • Posts: 1,795
  • Joined: 11-July 11

Re: Cannot get border over picture

Posted 15 March 2012 - 10:04 PM

Oh oops! Thanks for the tip Dormilich :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1