Highlighted

Problem with centering photos in columns

New Here ,
Oct 23, 2019

Copy link to clipboard

Copied

Hello, I have a problem when I'm publishing my website. I created another row with 2 columns underneath another row with 3 columns. When I'm clicking on preview in Dreamweaver it shows that images are centered in the second column but when I publish my site to the web images are moved to the left side.

 

HTML:

 

<div class="row1">
 <div class="column1">
 <img src="../fb_icon.png" class="social" width="100"   alt="facebook"></a>
 </div>
 <div class="column1">
 <img src="../insta_icon.png" class="social" width="100" alt="instagram"></a>
 </div>
 </div>
 
CSS
 
.column1 {
  float: left;
  width: 50%;
 
}
.row1::after {
  content: "";
  clear: both;
  display: table;
}
 
I'm just starting my journey with HTML so please be respectful. 😄

 

 

 

TOPICS
Code, Preview, Publish

Views

220

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Problem with centering photos in columns

New Here ,
Oct 23, 2019

Copy link to clipboard

Copied

Hello, I have a problem when I'm publishing my website. I created another row with 2 columns underneath another row with 3 columns. When I'm clicking on preview in Dreamweaver it shows that images are centered in the second column but when I publish my site to the web images are moved to the left side.

 

HTML:

 

<div class="row1">
 <div class="column1">
 <img src="../fb_icon.png" class="social" width="100"   alt="facebook"></a>
 </div>
 <div class="column1">
 <img src="../insta_icon.png" class="social" width="100" alt="instagram"></a>
 </div>
 </div>
 
CSS
 
.column1 {
  float: left;
  width: 50%;
 
}
.row1::after {
  content: "";
  clear: both;
  display: table;
}
 
I'm just starting my journey with HTML so please be respectful. 😄

 

 

 

TOPICS
Code, Preview, Publish

Views

221

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 23, 2019 0
Adobe Community Professional ,
Oct 23, 2019

Copy link to clipboard

Copied

What is the URL to your online page? 

 

 

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 23, 2019 0
Adobe Community Professional ,
Oct 23, 2019

Copy link to clipboard

Copied

Try

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <style>
      .images {
        display: flex;
        justify-content: center;
      }
    </style>
  </head>

  <body>
    <div class="images">
      <a href="https://www.facebook.com/22C11-103008301130983/">
      <img src="../fb_icon.png" class="social" width="100"   alt="facebook"></a>
      <a href="https://www.instagram.com/22c11_co/">
      <img src="../insta_icon.png" class="social" width="100" alt="instagram"></a>
    </div>
  </body>
</html>

Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 23, 2019 2