1 Replies - 649 Views - Last Post: 10 April 2013 - 10:35 AM

#1 nikc121  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 133
  • Joined: 12-April 10

CSS Image Hyperlink

Posted 10 April 2013 - 05:59 AM

I am trying to have a image open to a hyperlink, but every time I enter the hyperlink code it throws my image to the right. I think there is a conflict with my global.css, but I cannot seem to find it. The link to view my site is Portfoliio
HTML Code
<div class="portfolioBox1">
					<h2>Our Work</h2>
						<!--  / PORTFOLIO  \ -->
						<div class="portfolio1"> 
                       <a href="channel.html"><img src="images/portfolio_img1.jpg" /></a>
                        <img src="images/portfolio_img1.jpg" alt="" />
                        <img src="images/portfolio_img1.jpg" alt="" />
						</div>


Globla Css Code
/* ### PORTFOLIO BOX ### */
			.portfolioBox1 { padding: 20px 0px 0px 10px; width: 675px; overflow: hidden; }
			.portfolioBox1 h2 {
	padding:24px 22px 28px 82px;
	font-size: 36px;
	font-family:Nuptial BT;
	color: #49fb7e;
	font-weight: normal;
	background: url(../images/portfolio_heading.png) left top no-repeat;
}
			.portfolio1{ padding:38px 0px 36px 20px; width: 665px; overflow:hidden; border-bottom: solid 1px #1d1d1d;}						
			.portfolioBox1 p { padding-bottom:24px; font-size: 14px; color: #A6A5A5; line-height: 20px; }
			.portfolioBox1 img { margin-right:5px; float:left; border: solid 10px #333333; }
			.portfolioBox1 a { margin:8px 0px 0px 250px; padding-top: 5px; float:left;text-decoration: none; text-align: center; color: #000; width: 85px; height: 20px; background: url(../images/infoButton.jpg) no-repeat; } 
			.portfolioBox1 a:hover {
	color: #DB34A4;
	position: absolute;
}
			.portfolioBox1 .lasst{ padding-bottom:80px; border:none;}
			


Is This A Good Question/Topic? 0
  • +

Replies To: CSS Image Hyperlink

#2 BenignDesign  Icon User is online

  • holy shitin shishkebobs
  • member icon




Reputation: 6131
  • View blog
  • Posts: 10,591
  • Joined: 28-September 07

Re: CSS Image Hyperlink

Posted 10 April 2013 - 10:35 AM

Just taking a quick guess here as I have to get back to work, but this code:
.portfolioBox1 a { margin:8px 0px 0px 250px; padding-top: 5px; float:left;text-decoration: none; text-align: center; color: #000; width: 85px; height: 20px; background: url(../images/infoButton.jpg) no-repeat; } 


is moving your left margin 250px when you add a hyperlink (ie, moving it 250px to the right).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1