Solved

Horizontally centering an inline frame

Posted on 2011-09-20
5
215 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
This article discusses how to create an extensible mechanism for linked drop downs.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

708 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now