WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > HTML & XHTML > [SOLVED] beginner needs help with links

Reply
  Thread Tools Display Modes
Old 16th January 14, 09:56 PM   #1
ralf
WLC Member
 
Join Date: Jan 2014
Posts: 4
Default beginner needs help with links

i'm practicing writing code on Notepad++ and i'm having problems with my links. first of all they work fine going to the link. the thing is half the page including the images are clickable to go to the link. So how do i make only my image go to the link.

Since i'm here

there is an orphaned <center> tag that centers my first image/link and my embedded song at the bottom of the page. i do want my first image/link centered but not the embedded song. anyways, here it is:

<head>
<title>practice</title>
<link href="css/styles.css" type="text/css" rel="stylesheet"/>
<style type="text/css">
a:link { color: #000000; text-decoration: none}
a:visited { color: #000000; text-decoration: none}
a:hover { color: #3366CC; text-decoration: none}
a:active { color: #000000; text-decoration: none}
h3{font-family:arial; color: #ee3e80}
h1{font-family:cursive;color: #D8F781;}
</style>
</head>
<body>
<h3 align="center">for our eyes only</h3>
<center>
<a href="https://www.dropbox.com/s/wwhbdru3sr5t7rq/beginnings.wmv">
<img src="images/hello.jpg" width="260" height="200" border="0"/a>
<figcaption> mr. poo wants to say hello to you</center></figcaption>

<h1 align="center">poo master</h1>
<div align="center"><a href="https://www.dropbox.com/s/wwhbdru3sr5t7rq/beginnings.wmv"target="_blank">
<img src="images/boo.jpg" width="150" height="110"alt="" hspace="20"></a>
<a href="https://www.dropbox.com/s/wwhbdru3sr5t7rq/beginnings.wmv"target="_blank">
<img src="images/footsy.jpg" width="150" height="110"alt="" hspace="20"></a>
<a href="https://www.dropbox.com/s/wwhbdru3sr5t7rq/beginnings.wmv"target="_blank">
<img src="images/smile.jpg" width="150" height="110"alt="" hspace="20"></a>
</div>
<embed height="40" width="120" src="audio/What the World Needs Now Is Love.mp3">
</body>

Last edited by ralf; 17th January 14 at 04:56 AM. Reason: cleaning it up
ralf is offline   Reply With Quote
Old 19th January 14, 04:47 AM   #2
ralf
WLC Member
 
Join Date: Jan 2014
Posts: 4
Default Re: beginner needs help with links

i fixed the orphaned "center" with a "div-wrapper" but, i can still link to the video from the white space besides the first picture, its caption & the next two headers.

Last edited by ralf; 19th January 14 at 05:30 AM. Reason: clarify my problem
ralf is offline   Reply With Quote
Old 19th January 14, 10:17 AM   #3
Phreaddee
WLC Lover
 
Phreaddee's Avatar
 
Join Date: Oct 2010
Location: Newcastle, NSW, Australia
Posts: 768
Default Re: beginner needs help with links

Code:
<a href="https://www.dropbox.com/s/wwhbdru3sr5t7rq/beginnings.wmv">
<img src="images/hello.jpg" width="260" height="200" border="0"/>
</a>
remove the <center> tag, it's deprecated.
Phreaddee is offline   Reply With Quote
Old 19th January 14, 03:12 PM   #4
ralf
WLC Member
 
Join Date: Jan 2014
Posts: 4
Default Re: beginner needs help with links

thanks Phreaddee for responding. I took care of the <center> tag, now i just need to figure out why half my page links to the video.
ralf is offline   Reply With Quote
Old 20th January 14, 01:53 PM   #5
Phreaddee
WLC Lover
 
Phreaddee's Avatar
 
Join Date: Oct 2010
Location: Newcastle, NSW, Australia
Posts: 768
Default Re: beginner needs help with links

I gave you the solution to that too.

plus you will notice that all your <a> tags also link to the video.

if you don't want to link to the video then remove the link

Last edited by Phreaddee; 20th January 14 at 02:07 PM.
Phreaddee is offline   Reply With Quote
Old 20th January 14, 04:02 PM   #6
ralf
WLC Member
 
Join Date: Jan 2014
Posts: 4
Default Re: beginner needs help with links

the second closing tag, i missed it....thanks! that took care of it.
ralf is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:38 PM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyrightę 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.