Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Arrange image and text in a div, div after div

Arrange image and text in a div, div after div

Scheduled Pinned Locked Moved Web Development
questionregex
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    _Flaviu
    wrote on last edited by
    #1

    How can I list several div's tags with the following pattern ? Untitled hosted at ImgBB — ImgBB[^] I have tried something like this:

    .title{
    display: inline;
    }

    .icon{
    display: block;
    }

    .item-text{
    float: right;
    }

    	My title
    
    
    
    
    	![](...)
    
    
    
    
    	Lorepsum imte ...
    

    but don't work correctly.

    R 1 Reply Last reply
    0
    • _ _Flaviu

      How can I list several div's tags with the following pattern ? Untitled hosted at ImgBB — ImgBB[^] I have tried something like this:

      .title{
      display: inline;
      }

      .icon{
      display: block;
      }

      .item-text{
      float: right;
      }

      	My title
      
      
      
      
      	![](...)
      
      
      
      
      	Lorepsum imte ...
      

      but don't work correctly.

      R Offline
      R Offline
      Richard Deeming
      wrote on last edited by
      #2

      If you want the text to wrap, then float the image:

      .title {
      display: block;
      }
      .icon {
      float: left;
      margin-inline-end: .5em;
      margin-block-end: .5em;
      }
      .item-text {
      /* None */
      }

      Demo[^]


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      _ 1 Reply Last reply
      0
      • R Richard Deeming

        If you want the text to wrap, then float the image:

        .title {
        display: block;
        }
        .icon {
        float: left;
        margin-inline-end: .5em;
        margin-block-end: .5em;
        }
        .item-text {
        /* None */
        }

        Demo[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        _ Offline
        _ Offline
        _Flaviu
        wrote on last edited by
        #3

        Excellent, and if I would list several times that pattern, one under another ? I did:

        		Introduction To XHTML 1.0
        	
        
        	
        
        		![](http://dummyimage.com/200x200/f0f/fff)
        	
        
        	
        
        		Topics includes: Introduction To XHTML 1.0, 
        		Introduction To Tag and Attribute Syntax,
        		Introduction To Element Content Syntax, 
        		Document Structure and Head Level Tags, 
        		Body Tag and Block Level Tags,
        		Understanding In-line Elements and Tags, etc
        	
        
        	
        
        		Introduction To XHTML 2.0
        	
        
        	
        
        		![](http://dummyimage.com/200x200/f0f/fff)
        	
        
        	
        
        		222 2222 Topics includes: Introduction To XHTML 1.0, 
        		Introduction To Tag and Attribute Syntax,
        		Introduction To Element Content Syntax, 
        		Document Structure and Head Level Tags, 
        		Body Tag and Block Level Tags,
        		Understanding In-line Elements and Tags, etc
        

        but the pattern its not listed one under another.

        R 1 Reply Last reply
        0
        • _ _Flaviu

          Excellent, and if I would list several times that pattern, one under another ? I did:

          		Introduction To XHTML 1.0
          	
          
          	
          
          		![](http://dummyimage.com/200x200/f0f/fff)
          	
          
          	
          
          		Topics includes: Introduction To XHTML 1.0, 
          		Introduction To Tag and Attribute Syntax,
          		Introduction To Element Content Syntax, 
          		Document Structure and Head Level Tags, 
          		Body Tag and Block Level Tags,
          		Understanding In-line Elements and Tags, etc
          	
          
          	
          
          		Introduction To XHTML 2.0
          	
          
          	
          
          		![](http://dummyimage.com/200x200/f0f/fff)
          	
          
          	
          
          		222 2222 Topics includes: Introduction To XHTML 1.0, 
          		Introduction To Tag and Attribute Syntax,
          		Introduction To Element Content Syntax, 
          		Document Structure and Head Level Tags, 
          		Body Tag and Block Level Tags,
          		Understanding In-line Elements and Tags, etc
          

          but the pattern its not listed one under another.

          R Offline
          R Offline
          Richard Deeming
          wrote on last edited by
          #4

          Add clear: both; to the .title rule:

          .title {
          display: block;
          clear: both;
          }

          Demo[^]


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          _ 1 Reply Last reply
          0
          • R Richard Deeming

            Add clear: both; to the .title rule:

            .title {
            display: block;
            clear: both;
            }

            Demo[^]


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            _ Offline
            _ Offline
            _Flaviu
            wrote on last edited by
            #5

            Thank you a lot Richard ! It works !

            Z 1 Reply Last reply
            0
            • _ _Flaviu

              Thank you a lot Richard ! It works !

              Z Offline
              Z Offline
              Zarchiver Apk
              wrote on last edited by
              #6

              Great! Remini Download

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups