Gallery not viewing right in IE6 & 7 - css

I'm working on my website and I'm testing it out in all browsers and I love everything except the one thing IE 6 & 7 have been doing to my recent work gallery. I understand a lot of individuals don't feel supporting IE 6 is worth it however it's doing the exact same thing in IE 7 too. So I have to see whats going on.
My recent work gallery is supposed to have 2 rows and 3 columns, however in IE 6 & 7 it has 3 rows and 2 columns and I've tried some changes but it still looks the same.
This is how it looks in IE 6 & 7
This is how it looks in IE 8
CSS
![#RECENTWORK-WRAPPER {
width: 100%;
background: url(../images/irongrip.png) repeat;
color: #fff;
clear: both;
}
.RECENTWORK-CONTAINER {
width: 95%;
max-width: 1040px;
margin: 0 auto;
overflow: hidden;
/*border: 1px solid #000;*/
}
.galleryItem {
color: #797478;
font: 10px/1.5 Verdana, Helvetica, sans-serif;
float: left;
}
.galleryItem h3 {
text-transform: uppercase;
}
.galleryItem img {
max-width: 100%;
padding: 3px;
border: 1px solid #fff;
}
.galleryItem {
color: #797478;
font: 10px/1.5 Verdana, Helvetica, sans-serif;
float: left;
width: 29.33333%;
margin: 2% 2% 30px 2%;
}]
HTML
<div id="RECENTWORK-WRAPPER">
<div class="RECENTWORK-CONTAINER">
<h3><span>Recent Work</span></h3>
<div class="galleryItem">
<img src="images/recentwork-imageWH.jpg" alt="HOME GALLERY" />
</div>
<div class="galleryItem">
<img src="images/recentwork-imageWH.jpg" alt="HOME GALLERY" />
</div>
<div class="galleryItem">
<img src="images/recentwork-imageWH.jpg" alt="HOME GALLERY" />
</div>
<div class="galleryItem">
<img src="images/recentwork-imageWH.jpg" alt="HOME GALLERY" />
</div>
<div class="galleryItem">
<img src="images/recentwork-imageWH.jpg" alt="HOME GALLERY" />
</div>
<div class="galleryItem">
<img src="images/recentwork-imageWH.jpg" alt="HOME GALLERY" />
</div>
</div>
</div>
Do you know what is going on?
Any help is appreciated!

I think this might be your problem
width: 29.33333%;
Try taking that down to like 25% and see what it does. Sometimes padding and borders are a few pixels bigger on some browsers than others. If that works, then slowly increment it upward until it works in IE7

Related

Responsive design not being applied in sendGrid

I'm trying to apply responsive design in sendGrid. When I preview it in the website preview it is working, but when I send the test email and view it on mobile, I see that the #media screen has not been applied. Does anyone know what could be happening?
{{#if rewardData.deals.[0].coupon}}
<style>
#media screen and (max-width:300px) {
.teste {
width: 100% !important;
}
.firstDiv {
display: inline-block !important;
}
}
</style>
<div class="firstDiv" style="display: flex;
align-items: center;
border: 1px solid #D9D9D9;
border-radius: 8.49px;
padding: 16px;
margin: 35px 35px 25px 28px;">
<div class="teste" style="text-align:left; display: inline-block; margin-right: 16px">
<img class="max-width" style="border-radius: 8px" data-proportionally-constrained="true" data-responsive="false" src="{{rewardData.deals.[0].wideBanner}}" alt="Banner da recompensa">
</div>
<div class="teste" style="display: inline-block;">
<div style="display: flex; align-items: center; margin-bottom: 14px">
<img style="border-radius: 8px; margin-right: 8px" width="32" src="{{rewardData.deals.[0].icon}}" alt="Logo da recompensa">
<p style="display: inline-block; vertical-align: super">{{rewardData.deals.[0].title}}</p><br>
</div>
<b style="font-size: 12px; text-align: left; color: #2B332E">{{rewardData.deals.[0].shortDescription}}</b><br><br>
<b style="font-size: 12px; text-align: left;">Resgatar recompensa</b>
</div>
</div>
<div style="font-family: inherit; text-align: inherit; color: #000000; font-family: helvetica, monospace; font-size: 14px; margin-bottom: 50px; margin-top: 25px; margin-bottom: 25px; padding: 0px 40px">
<img class="max-width" border="0" style="color: #000000; text-decoration:none; font-family:Helvetica, arial, sans-serif; font-size:16px; vertical-align: bottom;" width="16" alt="" data-proportionally-constrained="true" data-responsive="true" src="http://cdn.mcauto-images-production.sendgrid.net/92d7128873c0e80b/6ee5ec4b-aaad-46cb-9c96-d5d61fb7231d/72x72.png">
<strong style="padding-left: 5px">Como usar minha recompensa?</strong><br><br>
<div style="line-height: 18px">
{{rewardData.deals.[0].description}}
<b>Seu voucher tem validade de até 30 dias para ser usado.</b>
</div>
</div>
{{/if}}
Many email clients do not support #media statements.
The website preview is a useful tool to preview your work, however it cannot show how an email will render across different mail clients.
Is there a way you can achieve your responsivenice without a media query?
Many mobiles are more than 300px wide, so try increasing the max-width from 300 to about 450.
Otherwise, take note of which email client you sent to and whether it supports media queries: https://www.caniemail.com/features/css-at-media/
There's quite a lot of code you use that is not supported. Email has an added layer or two to web design, in that email clients only accept a subset of HTML & CSS - more akin to HTML4 and CSS2, but there are lots of exceptions.
So, it may also not be working because flex is not supported, or align-items (flex is more widely supported, but all of the other parts of flexbox like align-items are very poorly supported).
I'd suggest you take a totally different approach and you'd need to research how to do a responsive HTML email as the topic is much too large for one question.

tinyMCE editor doesnt look the same as output

I am using tinyMCE editor, and I am using 2 same divs with float:right; in the CSS.
The issue I am having is that when I save the HTML, and open the saved content on any browser, it doesn't look the same as in the editor.
As an example I have attached 2 pictures, note there is a difference in the height of the blue boxes (in the editor and in the output).
Editor:
Output:
Here is the HTML in the editor:
<div class="sub-mw" div="">
1 <br />1<br />1<br />1<br />
<!--#*#TStem1#*#-->
<div id="enews">
<div class="enewstext">News</div>
</div>
<!--#*#TEtem1#*#-->
<br /><br /><br />
<!--#*#TStem1#*#-->
<div id="enews">
<div class="enewstext">News</div>
</div>
<!--#*#TEtem1#*#-->
1<br />1<br />1<br />1<br />1<br /><br />as<br />dasd
<br />asd<br />a<br />da
</div>
Also Here is the css used:
.enewstext {
color: #FFF;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
padding-top: 15px;
padding-bottom: 15px;
background: #0163b1;
width: 100%;
box-shadow: 0px 5px 0px #FFF;
text-indent: 20px;
}
#enews{
background:#3394e1;
width:18%;
height:300px;
float:right;
}
Edit 1:
In this scenario, tracing the issue, it is caused by the <br> tag. It has a smaller height in the tinymce editor than on chrome.
Any Idea on how to fix this ?

Trouble bordering images in css

This is my first post, and I apologize- pretty much a newbie. I have tried every technique that I can think of, and cant figure out how to create borders around three specific pictures in my site. My site is glh222.github.io
You will notice 6 images, three of which are bordered and sized appropriately and the other 3 which are enormously big. I have edited all pictures to be 285px, and my code in the HTML and CSS is consistent. I will post the code to both the relevant sections of the html and css below, please let me know if anyone can help. Thanks in advance!
<section id="GT">
<a href="#">
<img src="Images/gtsport.jpg" alt="Granturismo on an open road">
<p>Granturismo</p>
</a>
</section>
<section id="GTC">
<a href="#">
<img src="Images/GTC.jpg" alt="Granturismo Convertible">
<p>Granturismo Convertible</p>
</a>
</section>
<section id="GHIBLI">
<a href="#">
<img src="Images/GhibliSnow.jpg" alt="Ghibli in the snow">
<p>Ghibli</p>
</a>
</section>
<section id="GHIBLISQ4"
<a href="#">
<img src="Images/GTSLogo1.jpg" alt="SQ4 Logo">
<p>Ghibli SQ4</p>
</a>
</section>
<section id="QP"
<a href="#">
<img src="Images/QPblur1.jpg" alt="QP blurred">
<p>Quattroporte</p>
</a>
</section>
<section id="QPS"
<a href="#">
<img src="Images/GTSrear1.jpg" alt="Rear Facing in the snow">
<p>Quattroporte GTS</p>
</a>
</section>
CSS
#GT img {
width:100%;
padding:.5em, auto;
margin: .5em;
background-color:#c7ccf;
border: 20px black solid;
font-size: 1.5em;
font-family: 'Roboto', sans-serif;
text-align: center;
font-weight: 800;
font-weight: bold;
color: white;
float: left;
}
#GTC
img {
width:100%;
padding:.5em, auto;
margin: .5em;
background-color:#c7ccf;
border: 20px black solid;
font-size: 1.5em;
font-family: 'Roboto', sans-serif;
text-align: center;
font-weight: 800;
font-weight: bold;
color: white;
}
#GHIBLI
img {
width:100%;
padding:.5em, auto;
margin: .5em;
background-color:#c7ccf;
border: 20px black solid;
font-size: 1.5em;
font-family: 'Roboto', sans-serif;
text-align: center;
font-weight: 800;
font-weight: bold;
color: white;
}
#GHIBLISQ4
img {
width:100%;
padding:.5em, auto;
margin: .5em;
background-color:#c7ccf;
border: 20px black solid;
font-size: 1.5em;
font-family: 'Roboto', sans-serif;
text-align: center;
font-weight: 800;
font-weight: bold;
color: white;
}
#QP
img {
width:100%;
padding:.5em, auto;
margin: .5em;
background-color:#c7ccf;
border: 20px black solid;
font-size: 1.5em;
font-family: 'Roboto', sans-serif;
text-align: center;
font-weight: 800;
font-weight: bold;
color: white;
}
#QPS
img {
width:100%;
padding:.5em, auto;
margin: .5em;
background-color:#c7ccf;
border: 20px black solid;
font-size: 1.5em;
font-family: 'Roboto', sans-serif;
text-align: center;
font-weight: 800;
font-weight: bold;
color: white;
}
a:hover {
background-color: #aaaaaa;
Looks like you aren't getting the borders on the bottom 3 because your code is broken in multiple areas.
First, you have an extra:
<link href=
near the top of your page and
you are missing a > at the end of these three lines:
<section id="GHIBLISQ4"
should be:
<section id="GHIBLISQ4">
same goes for:
<section id="QP"
should be:
<section id="QP">
and
<section id="QPS"
should be:
<section id="QPS">
Your full code should look like this:
<!DOCTYPE html>
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="styles.css">
<title>"Maserati of Long Island"</title>
</head>
<body>
<header>
<h1> Welcome to Maserati of Long Island, A Division of The Experience Auto Group
Maserati...The Absolute Opposite of Ordinary</h1>
</header>
<div id="slogan">
<h2>Long Island's only factory authorized dealership</h2>
</div>
<section id="GT">
<a href="#">
<img src="Images/gtsport.jpg" alt="Granturismo on an open road">
<p>Granturismo</p>
</a>
</section>
<section id="GTC">
<a href="#">
<img src="Images/GTC.jpg" alt="Granturismo Convertible">
<p>Granturismo Convertible</p>
</a>
</section>
<section id="GHIBLI">
<a href="#">
<img src="Images/GhibliSnow.jpg" alt="Ghibli in the snow">
<p>Ghibli</p>
</a>
</section>
<section id="GHIBLISQ4">
<a href="#">
<img src="Images/GTSLogo1.jpg" alt="SQ4 Logo">
<p>Ghibli SQ4</p>
</a>
</section>
<section id="QP">
<a href="#">
<img src="Images/QPblur1.jpg" alt="QP blurred">
<p>Quattroporte</p>
</a>
</section>
<section id="QPS">
<a href="#">
<img src="Images/GTSrear1.jpg" alt="Rear Facing in the snow">
<p>Quattroporte GTS</p>
</a>
</section>
</nav>
<section id="about">
<div class="wrapper">
<h2>Operating from a state-of-the-art facility that's located in the heart of Long Island, our expertly trained staff is committed to serving each of your needs from the moment you walk through our doors, keeping one tenet in mind above all else: treating you like a member of our "family" from the moment you walk through the doors</h2>
</div>
</section>
<footer>
<p> You can contact us by calling (516) 665-1665, or if you prefer, you can stop by 65 South Service Rd, Plainview, New York 11803 and speak with us in person.</p>
</footer>
</body>
</html>
This will make your page look like the following:
Additionally, you may want to one single CSS class for your images, and then apply that class to all images instead of using separate classes for each image. This way, all your photos will be uniform and styled identically, and you won't have to write as much code.
You may also want to resize/crop your photos as well, as they are uneven right now, partially due to the fact that while they are all the same width, they are not all the same height, so some are taller than others.
AND
if you want to get rid of that gray box around your first image, remove the float:left; on the #GT img CSS
Your HTML was broken. Some of your section tags weren't closed with a >.
If you want to apply same rules to several elements, give them a class. I gave the elements class of .cars in my fix below.
You shouldn't be applying text formatting rules to an img tag, but instead the elements that actually contain some text.
You might want to use display:inline-block; and vertical-align:top; instead of float:left; because your elements have different heights.
Remove width:100% from your image if you want it to retain its original size. If you want each of the elements to have the same width, apply a width to the container (the section element) and and give the img a max-width of 100%.
.cars{
display:inline-block;
font-size: 1.5em;
font-family:'Roboto', sans-serif;
text-align: center;
font-weight: 800;
font-weight: bold;
vertical-align:top;
}
.cars a{
display:block;
padding: .5em;
color: white;
text-decoration:none;
}
.cars p{
background-color: #aaaaaa;
}
.cars img {
background-color:#c7ccf;
border: 20px black solid;
box-sizing:border-box; /* so the sizing of the image will include its border */
}
.cars a:hover {
background-color: #aaaaaa;
}
<section id="GT" class="cars">
<a href="#">
<img src="http://glh222.github.io/Images/gtsport.jpg" alt="Granturismo on an open road">
<p>Granturismo</p>
</a>
</section>
<section id="GTC" class="cars">
<a href="#">
<img src="http://glh222.github.io/Images/GTC.jpg" alt="Granturismo Convertible">
<p>Granturismo Convertible</p>
</a>
</section>
<section id="GHIBLI" class="cars">
<a href="#">
<img src="http://glh222.github.io/Images/GhibliSnow.jpg" alt="Ghibli in the snow">
<p>Ghibli</p>
</a>
</section>
<section id="GHIBLISQ4" class="cars">
<a href="#">
<img src="http://glh222.github.io/Images/GTSLogo1.jpg" alt="SQ4 Logo">
<p>Ghibli SQ4</p>
</a>
</section>
<section id="QP" class="cars">
<a href="#">
<img src="http://glh222.github.io/Images/QPblur1.jpg" alt="QP blurred">
<p>Quattroporte</p>
</a>
</section>
<section id="QPS" class="cars">
<a href="#">
<img src="http://glh222.github.io/Images/GTSrear1.jpg" alt="Rear Facing in the snow">
<p>Quattroporte GTS</p>
</a>
</section>

Issue with margin-top / padding-top of div. Display-block etc. not working

I'm a little new to coding and I've found these boards really helpful over the last few weeks but I've come across a problem that other posts couldn't help me with, so here goes:
I have a number of divs within one rectangle div, 880px across. The left aligned divs are working perfectly but the floated right div, a video 560px across called #shopvid_2013_01 just won't line up right.
I want it so that the #shopvid_2013_01 div lines up exactly beside the #shop_13_01 div, but instead when I preview it on Firefox it seems to be right underneath another div I have and won't move no matter what margin-top or padding-top I use. I tried adding display:block and overflow:hidden as I read on other posts that might help, but to no avail.
Any help would be appreciated!
I've included my relevant html and css:
HTML
<div id="shop_13">
<div id="shop_13_01">
<div id="shop_13_text_01">
<div id="shop_smlheading">
<p><b>West Cork Rally 2013</b></p>
</div>
<div id="shop_p_13">
<p>Our highlights video from a cracking weekend in Clonakilty.</p>
</div>
<div id="buy_shop_01">
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="6D49SM33FHD8U">
<input type="image" src="01 Images/buy_now_price.png" border="0" name="submit" alt="Buy Now">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
</div>
</div>
<div class="shopvid_2013_01">
<iframe width="560" height="315" src="http://www.youtube.com/embed/ozXu2-Zf5B0" frameborder="0" allowfullscreen></iframe>
</div>
</div>
CSS
#shop_13 {
width:880px;
}
#shop_13_01 {
width: 320px;
height:315px;
margin:30px 0 0 0;
background-color:#E9E9E9;
float:left;
}
#shop_13_text_01 {
font-family: "Arial", sans-serif;
width:240px;
font-size:13px;
line-height:1.4em;
}
#shop_smlheading {
padding: 5px 0 0 20px;
font-size:15px;
}
#shop_p_13 {
font-family: "Arial", sans-serif;
width:240px;
font-size:13px;
line-height:1.4em;
margin: -15px 0 0 20px;
float:left;
}
#buy_shop_01 {
padding: 100px 0 0 0;
float:left;
}
#shopvid_2013_01 {
width: 560px;
height:315px;
float: right;
margin-top: 30px;
display:block;
overflow:hidden;
}
It seems that you are referencing shopvid_2013_01 as an ID rather than a CLASS. Try this:
.shopvid_2013_01 {
width: 560px;
height:315px;
float: right;
margin-top: 30px;
display:block;
overflow:hidden;
}
http://jsfiddle.net/gGtPK/

EDIT Will not display side by side but is stacked

I am new to coding HTML/CSS but I have a pretty good grasp so far. I have spent the last few hours trying to get my code side by side but it always remains stacked. My code is
<div class="api" style="float:left;">
<a href="https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro" target="_blank">
<img src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" style="width:50%; border:0" alt="Download ROM Toolbox Pro from Google Play" title="Download ROM Toolbox Pro from Google Play">
</a>
<div>
<div class='appbrain-app'>
<a href='http://www.appbrain.com/app/com.jrummy.liberty.toolboxpro' style='font-size: 11px; color: #555; font-family: Arial, sans-serif;'>
</a>
<script type='text/javascript' language='javascript' src='http://www.appbrain.com/api/api.nocache.js'></script>
</div>
</div>
</div>
And my CSS is,
.api {
margin: 0 auto;
margin-top: 1em;
max-width: 700px;
padding: 1em;
background-color: #e2e2e2;
border: 1px solid #C9C9C9;
box-shadow: 0 0 2px #C9C9C9;
-moz-box-shadow: 0 0 2px #C9C9C9;
-webkit-box-shadow: 0 0 2px #C9C9C9;
border-radius: 3px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
display: inline-block;
}
If you tell me what I am missing in order to get the info displayed side by side I would greatly appreciate it. If you have any other code cleanups that you can point out that would be great also but not needed.
EDIT:
Thank you for all your help guys, I have tried both Watson and Pete's answers but sadly they are not working. I took some screenshots of what it is without your code and with your code. You can find them here, https://dl.dropbox.com/u/11217802/sidebyside.png
I have also been able to get it working but I am trying to avoid as much inline styling as possible and I believe that I have pointless tags and way too many <div> for this small project.
<div class="api">
<div>
<td style="vertical-align: middle; text-align: center; background: #e2e2e2; border-top: 0px; ">
<a rel="nofollow" href="https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro" class="no_ul external" target="_blank">
<img src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" style="width:100%; border:0" alt="Download ROM Toolbox Pro from Google Play" title="Download ROM Toolbox Pro from Google Play">
</a>
</td>
</div>
<div style="float: left;">
<div class="appbrain-app">
<a href='http://www.appbrain.com/app/com.jrummy.liberty.toolboxpro' style='font-size: 11px; color: #555; font-family: Arial, sans-serif;'>
</a>
</div>
<script type='text/javascript' language='javascript' src='http://www.appbrain.com/api/api.nocache.js'></script>
</div>
</div>
As far as the CSS, that did not change from what I posted orginally.
Thanks again Grady
try this:
.api a, .api div, .api img {
float: left;
}
and a tip: you should indent your code, so the child nodes are inside the parent nodes, like:
<div>
<a>Example</a>
<img>
<div>
<a>Example</a>
</div>
</div>
sibling nodes (when one tag is not inside another) should be indented the same amount.
looking at your code you have only floated the containing div, all the divs inside it are still block elements, if you want these to be side by side, you can do one of the following:
change them to inline elements .api div {display:inline;}
change them to inline-block elements .api div {display:inline-block;}
float them left .api div {float:left;}
EDIT
Having looked at your edit and tried your code in jsfiddle, the problem is the javascript is creating a lot of extra divs. I have changed your code layout to get things side by side:
http://jsfiddle.net/xFu4Z/1/
html
<div class="api">
<img src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" style="width:50%; border:0" alt="Download ROM Toolbox Pro from Google Play" title="Download ROM Toolbox Pro from Google Play" />
</div>
<div class='appbrain-app'>
<a href='http://www.appbrain.com/app/com.jrummy.liberty.toolboxpro' style='font-size: 11px; color: #555; font-family: Arial, sans-serif;'></a>
<script type='text/javascript' language='javascript' src='http://www.appbrain.com/api/api.nocache.js'></script>
</div>
CSS
.api,
.appbrain-app {float:left;}
Please note that you will need to make sure the widths of .api and .appbrain-app added together don't exceed the width of the container they are in - I just noticed that on your original styles you have set a max-width of 700px which means that it is probably going to push the .appbrain-app div down a line
I restructured your markup:
<style>.api {
margin: 0 auto;
margin-top: 1em;
max-width: 700px;
min-width: 300px;
padding: 1em;
background-color: #e2e2e2;
border: 1px solid #C9C9C9;
box-shadow: 0 0 2px #C9C9C9;
-moz-box-shadow: 0 0 2px #C9C9C9;
-webkit-box-shadow: 0 0 2px #C9C9C9;
border-radius: 3px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
display: inline-block;
}
.appbrain-app { float: right; width: 48%; border: 1px solid red; }
</style>
<div class="api" style="float:left;">
<div>
<a href="https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro" target="_blank">
<img src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" style="width:50%; border:0" alt="Download ROM Toolbox Pro from Google Play" title="Download ROM Toolbox Pro from Google Play">
</a>
<div class='appbrain-app'>
<a href='http://www.appbrain.com/app/com.jrummy.liberty.toolboxpro' style='font-size: 11px; color: #555; font-family: Arial, sans-serif;'>
</a>
<script type='text/javascript' language='javascript' src='http://www.appbrain.com/api/api.nocache.js'></script>
</div>
</div>
</div>

Resources