Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Horizontally centering an inline frame

Posted on 2011-09-20
5
Medium Priority
?
228 Views
Last Modified: 2012-05-12
Hello experts,

Does anyone know how to center an inline frame? To put it into context, I'm trying to center the Amazon aStore inline frame I have on my website. I can't extend the website border out because it's a GoDaddy template. The web page I'm trying to do this on is http://www.snowboarding-jackets.net/Store.html, and as you can see the inline frame blocks out some of the content on the right because it opens on the left. I have a scroll bar at the bottom but that isn't ideal. If there is another way to show the whole shop on the page then I'm all ears.

I eagerly await your advice.

Cheers.
0
Comment
Question by:MaxP0wers
  • 2
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 1000 total points
ID: 36572149
give some negative padding to the left of wrapping div
0
 
LVL 9

Expert Comment

by:user_n
ID: 36572439
Try http://astore.amazon.com/snowboarding-jackets-20 line 183
from   padding-left: 4px; to   padding-left: 2px;

div#searchbrowse {
    padding-bottom: 14px;
    padding-left: 2px;
    padding-right: 14px;
    padding-top: 14px;
}
0
 

Author Comment

by:MaxP0wers
ID: 36572575
Thanks guys, I follow what your saying mostly, but am unsure on exactly how to do what your saying. Could you please dumb it down a bit as I'm not too experienced with code. Especially when using CSS in combination with HTML as I have little, next to no experience with CSS.

Could you talk me through the process of adding this code in more detail please.

Thanks for the help :)
0
 
LVL 9

Expert Comment

by:user_n
ID: 36572615
change in your source
/* SEARCHBROWSE WIDGET */
div#searchbrowse {
      padding:14px;
}


to

/* SEARCHBROWSE WIDGET */
div#searchbrowse {
       padding-bottom: 14px;
    padding-left: 2px;
    padding-right: 14px;
    padding-top: 14px;
}
0
 

Author Comment

by:MaxP0wers
ID: 36578830
Oh gotcha. Works great but creates one more problem. How do I source the new code and the url for the amazon aStore? The links in the aStore are all dead when I create the new script as it's not sourced straight from Amazon. The HTML code I have for the new one is:

<img alt="" uid="d6522d45-827d-454e-804c-22f38cc0b7f2" src="http://img1.wsimg.com/wst/old/ftb/images/utility/ss_kvk9LoefFL4BS-2F3rS95PzZG3w_gn3bS2z4ywE.gif" class="script" />

Open in new window


With the amazon affiliate url inserted into the 'src' part:

http://astore.amazon.com/snowboarding-jackets-20

Open in new window


This is the original code I had:

<iframe width="100%" scrolling="auto" height="980" frameborder="0" align="middle" src="http://astore.amazon.com/snowboarding-jackets-20"></iframe>

Open in new window


Sorry but I'm quite new to all of this so I'm a bit slow with all the lingo.

Cheers
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
The viewer will learn how to count occurrences of each item in an array.

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question