Jump to content


Need Major Help with Image linking?


4 replies to this topic

#1 dbrree

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 05 September 2008 - 11:27 AM

Ive been doing design and webdesign for a long time but just recently started integreating CSS more and more and more. Anyways im havin a problem with this basic code.

<a href="image.jpg"><img src="thumbnail.jpg"></a>

Now the problem is I cant repeat this horizontally across the page. Like so.


 <a href="image.jpg"><img src="thumbnail.jpg"></a>
<a href="image.jpg"><img src="thumbnail.jpg"></a>
<a href="image.jpg"><img src="thumbnail.jpg"></a>
<a href="image.jpg"><img src="thumbnail.jpg"></a>

Now naturally this would have no padding BUT it would repeat across the page until there was no more room in the div and begin underneath. My thumbnail is 150x150 BUT the area that you can actually click to expand the image streches across the entire width of the content space which causes each image to repeat on its own individual line underneath. I thought this might be because i was using Lightbox 2.0 so i removed it and just left it at basic HTML with no immediate Styles or scripts affecting it to try to solve it. This didnt help.

Heres the page.
dustinbarre.com

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 05 September 2008 - 12:10 PM

To get the image to automatically repeat across a certain area you would want to use a background-image (via css).

The following topic should help you a little:
http://www.pixel2lif...showtopic=20224

#3 Tyson D

    Young Padawan

  • Members
  • Pip
  • 85 posts
  • Gender:Male
  • Location:Canada

Posted 05 September 2008 - 12:33 PM

I think your problem is in your CSS.

If you go to main.css....

a img,img{border:none;display:block;}

You're displaying them as block. Don't do that if you don't want them on separate lines. Otherwise make a thumbnail class and specify a width so your thumbnails can have a set width. Then you can float them all left. But it'd be best to just get rid of the display: block;

#4 dbrree

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 05 September 2008 - 12:36 PM

View PostTyson D, on Sep 5 2008, 12:33 PM, said:

I think your problem is in your CSS.

If you go to main.css....

a img,img{border:none;display:block;}

You're displaying them as block. Don't do that if you don't want them on separate lines. Otherwise make a thumbnail class and specify a width so your thumbnails can have a set width. Then you can float them all left. But it'd be best to just get rid of the display: block;

nice dude thanks so much, i honestly didnt really understand that, im pretty much learning CSS. That fixed the problem i appreciate it =].

#5 Tyson D

    Young Padawan

  • Members
  • Pip
  • 85 posts
  • Gender:Male
  • Location:Canada

Posted 05 September 2008 - 12:38 PM

No problem! Glad to help. Cheers :angrylooking:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users