Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Caption text limit?

Edrol97

Well-Known Coder
Hi all,

I'm having a bit of a tricky time figuring out what I'm doing wrong here. I'll attach my code up to the point of the problem. All other captions are the correct length apart from one where it omits the last 3 words, and I'm not sure why as there is no difference between each of the other div sections in my code. I've put in a div class for title text and I'm not sure if that might be what's causing the issue.

HTML:
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Image carousel</title>
    <link rel="stylesheet" href="style.css">
  </head>
  <body>
<h1>The Headlines</h1>
    <div class="container">
        <img src="img/Slide%20away.png" alt=" "width="300px" onclick="LaunchLightbox()">
    </div>
    <div class="slide-show_container">
        <div class="next_button" onclick="NextImage()" onclick="cursor:pointer">&#10233</div>
        <div class="previous_button" onclick="PreviousImage()">&#10232</div>
        <div class="close_button" onclick="CloseLightbox()">&#9746</div>
        <div class="image_slide" onclick="slides()"></div>
            
            <div class="image_slide">
                <img src="img/BA Exhibition View.png" width="400px">
                <div class="title_text">Politics 24/7?</div>
                <div class="caption_text">Come in. Take a seat! Make yourself at home, but something doesn't
                    feel quite right
                </div>
            </div>
            <div class="image_slide">
                <img src="img/Truly Brexish Summer.jpg" width="400px">
                <div class="caption_text"> A display for the BCX 2019 show at the Bentall Centre. An ironic 
                    party in Brexit's dishonour</div>
                </div>
            <div class="image_slide">
                <img src="img/New Contemps 2019.png" width="400px">
                <div class="title_text">Boris Can't Get Clean, however much he tries</div>
                <div class="caption_text">Into the Gallery at South London Gallery, Leeds Art Gallery and The RA</div>
            </div>
 
Apart from the code being incomplete, you are not being very clear. Which one of these captions is in error then ?
Please post the complete HTML, as well as the style.css file.
 

New Threads

Buy us a coffee!

Back
Top Bottom