Need some simple help with HTML/CSS.

Discussion in 'Web Design and Development' started by definitive, Sep 7, 2010.

  1. definitive macrumors 68000


    Aug 4, 2008
    I'm trying to install JQuery Cycle plugin ( ), and add text to the left of each photo. Here's the code I have so far:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="">
        <link rel="stylesheet" type="text/css" media="screen" href="style.css" />
        <script type="text/javascript" src="js/jquery/jquery.js"></script>
        <script type="text/javascript" src="js/jquery/jquery.cycle.all.min.js"></script>
        <script type="text/javascript">
    	$(document).ready(function() {
                fx: 'fade'
        <div class="box">
            <div class="slideshow">
    	   <img src="images/photo_01.jpg" width="500" height="300" />
               <img src="images/photo_02.jpg" width="500" height="300" />
    	   <img src="images/photo_03.jpg" width="500" height="300" />
    	   <img src="images/photo_04.jpg" width="500" height="300" />
    and for css"

    body {
    	background-color: #000;
    img	{
    	border-style: none;
    .box {
    	width: 940px;
    	position: relative;
    	margin: 0 auto;
    .slideshow {
    	height: 300px;
    	width: 500px;
    	margin: auto;
    	float: right;
    .slideshow img {
    	padding: 0px;
    	border: 1px solid #ccc;
    I've left some of the code out, but basically this should give you an idea of what I have right now for the slideshow. At this point I'm stuck. I'm trying to get a <h1> to go on the left of the image, and <p> right under it. The <h1> would have a link, while the paragraph under it wouldn't. Each time the page fades, the text in <h1> and <p> would change accordingly to photo's content, and would also have a link in the heading. I've tried inserting the code around img tag, but it ends up coming up on top instead of left. Anyone have any suggestions?
  2. manueld macrumors 6502

    Jun 8, 2009
    If you're trying to place content inside the slideshow div (the h1 and p) your width needs to be wider than 500px as your image is already 500px hence why you're getting overlap. Increasing the size of your slideshow div should do the trick.

Share This Page