Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

force div block and list below image

  • 08-03-2011 02:21PM
    #1
    Registered Users, Registered Users 2 Posts: 7,638 ✭✭✭


    Below is some code, I have removed text so the company cant be identified
    <div class="highlight1"><span class="highlight">blah</span></div>
    <div class="notice">
    <div class="icon">blah</div>
    </div>
    <p><img src="images/blah.jpg" border="0" alt="blah" width="142" height="212" style="float:left;margin:3px;border:1px solid #CCCCCC;" /></p>
    <ul class="bullet-6">
    <li>blah</li>
    <li>blah</strong></li>
    <li>blah</li>
    <li>blah</strong></li>
    <li>blah</strong><br /><br />
    <script src="jwplayer/jwplayer.js" type="text/javascript"></script>
    <script type="text/javascript">// <![CDATA[
      jwplayer('mediaplayer').setup({
        'flashplayer': '/jwplayer/player.swf',
        'id': 'playerID',
        'width': '250',
        'height': '25',
        'file': '/blah.mp3',
        'controlbar': 'bottom'
      });
    // ]]></script>
    </li>
    </ul>
    [B]<div class="notice">
    <div class="icon">blah</div>
    </div>
    <ul class="bullet-6">
    <li>Yblah<br /><br />
    <script type="text/javascript">// <![CDATA[
      jwplayer('secondmediaplayer').setup({
        'flashplayer': '/jwplayer/player.swf',
        'id': 'secondPlayerID',
        'width': '250',
        'height': '25',
        'file': '/images/stories/audio/blah.mp3',
        'controlbar': 'bottom'
      });
    // ]]></script>
    </li>
    </ul>[/B]
    

    right now the image has a question above it and then the answer to the question to its right, this is what i want. however it also has the next question and the next answer(which is the bolded part of the code above) to its right. I want this to be forced under the image and then I will be putting an image under this next question as well and so on and so forth for a total of 5 questions

    the only way I can do this is using <p><br /><br /><br /><br /><br /></p> but I am sure there must be a cleaner way

    any ideas?


Comments

  • Registered Users, Registered Users 2 Posts: 12,026 ✭✭✭✭Giblet


    Add a clear:left style to each question container.


  • Registered Users, Registered Users 2 Posts: 7,638 ✭✭✭PeakOutput


    Does that have to be done in the css file?

    so I would have to add

    {clear:left} to the div class notice? or can I add it straight into the html file like this
    <div class="notice" clear:left>
    <div class="icon">blah</div>
    </div>
    


  • Registered Users, Registered Users 2 Posts: 669 ✭✭✭whatstherush


    PeakOutput wrote: »
    Does that have to be done in the css file?

    so I would have to add

    {clear:left} to the div class notice? or can I add it straight into the html file like this
    <div class="notice" clear:left>
    <div class="icon">blah</div>
    </div>
    

    You can add it to the notice class or inline, but your above code is incorrect, it should be
    <div class="notice" style="clear:left">
    <div class="icon">blah</div>
    </div>
    


Advertisement