Solved

Horizontally centering an inline frame

Posted on 2011-09-20
5
217 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:
gurvinder372 earned 250 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

832 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