CSS Float Top Left Image not displaying
-
Using CSS/HTML in Dreamweaver CC, I am trying to display a SEO friendly matrix of six images wide by three deep on the Home Page, but cannot get the first (top left) image to display consistently.
The page appears correctly in Dreamweaver Design View, but not in the Live View. Equally it works fine in Safari, but not in Firefox nor I.E.
I seem to have tried every CSS variation to resolve this issue, without success. Can someone stear me in the right direction, please?
The relevant HTML Code ...
Celotex PL4050 - 62.5mm insulated wallboard from £11.96 per m² / £34.45 per board
SuperFoil SF19 40mm Multi-foil Roll from £5.23 per m² / £98.00 per 18.75 m² Roll
Celotex GA4000 General application Rigid PIR from £8.56 per m² / £24.66 per board
Rockwool Full-fill 75mm Cavity Wall Slabs from £3.51 per m² / £1.92 per slab
Knauf Earthwool 270mm Loft Roll 44 Combi-Cut from £3.80 per m² / £22.51 per 9.93 m² Roll
Kingspan Kooltherm K8 75mm Cavity Wall Boards from £16.26 per m² / £8.79 per board
Knauf Earthwool 170mm Combi-cut Loft Roll 44 from £3.16 per m² / £25.34 per 8 m² Roll
Kingspan Kooltherm K7 Rigid Phenolic Foam - 75mm £13.91 per m² / £40.05 per board
...
The associated CSS code ...
#popular {
width: 1050px;
height: 800px;
overflow: hidden;
width: auto;
height: auto;
}
#product1 {
background-image: url(../007-graphics/popular/01-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 24px;
float: left;
overflow: auto;
clear: left;
}
#product2 {
background-image: url(../007-graphics/popular/02-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 10px;
float: left;
opacity: 0.85;
}
#product3 {
background-image: url(../007-graphics/popular/03-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 10px;
float: left;
max-height: 275px;
opacity: 0.85;
}
#product4 {
background-image: url(../007-graphics/popular/04-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 10px;
float: left;
max-height: 275px;
}
#product5 {
background-image: url(../007-graphics/popular/05-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 10px;
float: left;
max-height: 275px;
opacity: 0.85;
}
#product6 {
background-image: url(../007-graphics/popular/06-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 10px;
float: left;
max-height: 275px;
opacity: 0.85;
}
#product7 {
clear: both;
background-image: url(../007-graphics/popular/07-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 24px;
float: left;
max-height: 275px;
opacity: 0.85;
}
#product8 {
background-image: url(../007-graphics/popular/08-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 10px;
float: left;
max-height: 275px;
}
#product9 {
background-image: url(../007-graphics/popular/09-prod.png);
background-repeat: no-repeat;
width: 150px;
height: 265px;
margin-left: 10px;
float: left;
max-height: 275px;
opacity: 0.85;
} ...The complete code is located at - www.just-insulation.com/index.html
-
G'day Jesse,
I have added the following code to my .htaccess file ...
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.index.html\ HTTP/
RewriteRule ^(.)index.html$ http://www.just-insulation.com/$1 [R=301,L]All attempts to add a similar code to redirect in the other direction results in the home page not loading, or the creation of an infinite loop.
Open Site Explorer still returns ...
www.just-insulation.com a PA of 32 and
www.just-insulation.com/index.html a PA of 15The thought of all this lost link juice is making me really thirsty.
-
Yes exactly. Assuming you're on an Apache server, of course.
Just to clarify, I ran both URLs through Open Site Explorer and sure enough two different Page Authorities returned:
www.just-insulation.com has a PA of 32
www.just-insulation.com/index.html has a PA of 15
Showing that in fact your link juice is splitting there when ideally you will want it combined.
-
Should I understand that you are proposing that I use the .htaccess file to create a server side redirect?
-
No problem.
While it is good you have the canonical tag present, you should still redirect one to the other. The canonical tag will prevent any duplicate content issues with your site so at least you don't have to worry about that. But not redirecting can still have some unwanted effects on your page.
Basically it can split your PR/PA between two URLs. If somebody links to yourdomain.com and another somebody links to yourdomain.com/index.html these two links are now receiving juice separately. The canonical tag does not carry link juice. That is why you want to 301 the index.html page to your root domain. Your hosting provider should be able to do this easily for you, or go ahead and google it if you have your own server. (the process changes based on whether you're hosting via Apache servers or IIS servers.)
I would still focus on getting that redirected. It'll save you headaches in the future.
Good luck!
-
Thanks again for your input, Jesse.
Your 301 Redirect has me worried. We presently have the canonical statement on our home page ... - and thought that this was the correct way to prioritise http://www.just-insulation.com over http://www.just-insulation.com/index.com . Also, the weekly Moz Campaign Crawl Diagnostics is not showing any errors. Can you elaborate on the best method to resolve this issue?
I continue to search for an appropriate SEO friendly Add-in that will allow me to frequently change the front page images / hyperlinks / descriptions / etcetera. However, I certainly do take your advice on board.
Many thanks.
-
Bravo, sir! May I make one more SEO related quick-suggestion:
Make sure you redirect your page with a 301 to avoid duplicate content. Right now you have two addresses (www.domain.com and www.domain.com/index.html) displaying the same content. These will both be indexed and should be redirected.
Also from a usability standpoint I feel like the images should be clickable... But there are a ton of these little nit-picky changes I'll leave to you
You might be kind of shooting yourself in the foot with the whole image name thing. You don't have alt tags or image names and that can affect your on-site optimization. However you won't rank for every product on one page anyway so in your case it might not matter terribly. Still I'd raise an eyebrow if it were my page..
Anyway good luck!
-
Greetings Jesse,
Thanks for the feedback. It seems that once I removed the drop shadows from the images, the situation resolved itself. Clearly there was a sizing issue with one or more of the images that was throwing the CSS float out of kilter.
The reason that I named the images prod-1, prod-2, prod-3, was to semi-automate future image changes. As these are background images, populated through CSS, rather then HTML, I understood that they had no influence on SEO.
Sorry about your headache, and 'Yes', you were quite right that the 'Happy Monkey' font was totally over the top! That came about because of my mistake in the CSS Links, and has since been resolved.
I have been trying to identify a jQuery Gallery or Lightbox to use instead of CSS, but without luck so far.
Again, my thanks for your critique.
-
Hi there Maximise,
Thank you for the advice. The problem is now solved thanks to the responses to my post.
It seems, that (following Jesse's critique) when I removed the drop shadows from the images, the situation resolved itself. I can only imagine that the Drop Shadows were effecting the image size, and this impacted upon the CSS Float mechanism.
Anyway, thanks again.
-
Thanks!
It relates to elements that are floated. Options are left, right, both or none. So if you have "clear:left" then this element can not have any floated elements to it's left and would therefore be bumped to the next line.
-
Ha! Yeah that'll do it. Nicely done Maximise.
As a side, what does the clear: operator do in CSS?
-
The product 1 image doesn't seem to exist. Are you sure you don't have it cached in some browsers? Follow this link and press F5 to see if it loads - it doesn't for me.
http://www.just-insulation.com/007-graphics/popular/01-prod.png
-
Couple things here --
First off I'm not sure you'll get the best coding advice here on the moz forums.. Although I know there are some people here who are good at it for sure. You may be better off with these types of questions at stackoverflow.com (just a thought)
Moz will give you awesome marketing/optimization tips though. For example, I might say to you "hey why are your images titled '09-prod.png' that isn't doing anything for your optimization..." Or I might say "oof. No offense but that site kinda gives me a headache. See if you can make it less busy and scale that drop shadow down... Is that comic sans?? no."
But also to answer your question, my best bet would be that your first product definition in the CSS has a "clear:left" operator assigned to it. That is most likely why it is not displaying. Try removing that.
Hope this helps!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
How to Make my Site Appear in google search like the attached image?
Whenever I search for my website, All of the pages appears as different search results. However, I want my website to appear as most of the website out there appears. I have attached an image for your understanding (that's what exactly I want to get). I Shall be very thankful! Oycm2Kd
Technical SEO | | primecoursesfree1 -
Image sitemap
I work on a big eCommerce site with thousands of pages. We are talking about crating a separate image sitemap. Any idea example of an eCommerce site who has a separate image sitemap? I looked several and cant find one. Also, what are the best practices for creating a good image sitemap? thanks!
Technical SEO | | bizuH0 -
Should I use a canonical URL for images uploaded to a blog post in Wordpress?
Hi, I have a wordpress website that has articles/news posts witch contain imagery. I've noticed that in the Media Library, when you upload an image to a blog post it generates a new permalink ...article-name/article-image-01.jpg I have Yoast SEO plugin and have the option to set a canonical URL for this image. Should I point it back to the actual article? Thanks for any helpers with this.
Technical SEO | | Easigrass0 -
Top domain(s) not at all showing up for branded keywords
Hey guys! Hope you're all doing well. I need your smart brains for a problem the company I work for is currently facing in the realm of SEO. They wanted to hire someone to find the problem, but I thought I would reach out to you guys, first, to at least try and narrow down the long list of things we could look at/investigate. I put the info (briefly) on 3 slides, and would really appreciate any and all insights you can offer me: https://docs.google.com/presentation/d/12d0YH7BNdCIpJ86d95uBOtOWphWQ3NB1kwDYeOzIt-U/edit#slide=id.g19145c9fa5_0_0 Thank you in advance!
Technical SEO | | michelledemaree0 -
Having javascript in the top of the source code
Dear Moz-community, In our company, we are torn about the influence of having a ton of javascript on the top of our source code - while our Tech guys are downplaying it's influence, us marketeers aren't quite sure. The link is here: view-source:http://www.bettingexpert.com/tips/football/italy/serie-a It is the javascript that is loaded right after the Would this be a problem with Google? Thank you very much,
Technical SEO | | BetterCollective
William0 -
Content: How Much and What Kind for top Keyword Rankings?
Aside from well optimized meta tags, alt tags, captions I could use some help figuring out: What's the recommended number of words (original of course) on page? What should be the keyword % ? We've recently engaged an SEO company to provide an audit, and hired another for comparison and guess what ... 2 different viewpoints. I consider this to be the worst $3 grand we've ever spent! I look forward to your opinions
Technical SEO | | HMCOE0 -
Risks and rewards of positioning content with CSS
Some SEO folks (such as http://www.stonetemple.com/articles/css-and-seo.shtml) advocate using CSS so that unique content in the body of your page appears earlier in the file than non-unique content (such as, for example, the content of an elaborate drop-down menu system). What say you? Do search engines now disregard position on page, and look at your pages holistically?
Technical SEO | | ahirai0 -
Replacing H1's with images
We host a few Japanese sites and Japanese fonts tend to look a bit scruffy the larger they are. I was wondering if image replacement for H1 is risky or not? eg in short... spiders see: Some header text optimized for seo then in the css h1 {
Technical SEO | | -Al-
text-indent: -9999px;
} h1.header_1{ background:url(/images/bg_h1.jpg) no-repeat 0 0; } We are considering this technique, I thought I should get some advise before potentially jeopardising anything, especially as we are dealing with one of the most important on page elements. In my opinion any attempt to hide text could be seen as keyword stuffing, is it a case that in moderation it is acceptable? Cheers0