Solved

Horizontally centering an inline frame

Posted on 2011-09-20
5
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Setting up LaraDock for Laravel

Learn how to set up LaraDock in a Laravel project - LaraDock gives us an easy way to run a Laravel application using Docker in a single command.

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

630 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