Solved

Displaying a widget in the right position on a web page

Posted on 2015-02-15
6
75 Views
Last Modified: 2015-03-03
I'm trying to change the way a widget from tripadvisor.com displays on my web page.

I don't know much about coding, but I've got the widget working using the supplied code thus:

<div id="TA_cdsratingsonlywide715" class="TA_cdsratingsonlywide"></div>
<script src="http://www.jscache.com/wejs?wtype=cdsratingsonlywide&uniq=715&locationId=7683847&lang=en_AU&border=true&shadow=true&display_version=2"></script>

This works fine, but the widget displays all the way over to the left & I'd like to see it a bit further to the right.

How do I position the widget?
0
Comment
Question by:snooflehammer
  • 3
  • 2
6 Comments
 
LVL 35

Expert Comment

by:mccarl
ID: 40612039
Can you post more of the code around what you have shown above? Also can you screenshot how it currently looks and (if you can) show us where you want it to go?
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40612631
You could try moving it with CSS:

#TA_cdsratingsonlywide715 {margin-left:25px;} should (in theory) more it 25 oixels to the right, but with third pary junk you never know what kind of mess they are making with their own classes and the scripting.  It is like the authors of widgets think they have a right to take control of any page that uses their trash.

Cd&
0
 

Author Comment

by:snooflehammer
ID: 40613010
COBOLdinosaur thanks for you input. I changed the first line of code as follows:

<div id="#TA_cdsratingsonlywide715{margin-left:25px;}" class="TA_cdsratingsonlywide"></div>

I may have misunderstood your suggestion, as it doesn't work, rather it breaks the widget which now displays "Please check the TripAdvisor code and install again"

Are you able to suggest what I've done wrong?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40615215
You should not be touching the widget at all.  As you can see it may be damaged if you do that.  you need to add the styling in you stylesheet with:
#TA_cdsratingsonlywide715 {margin-left:25px;}

It would be best if the stylesheet where you make the entry is the last one in head so it has greater potential to override what is being applied to the widget.  However ther is no guarantee that it will work because the scripting will override everything if it is also applying styles.

Cd&
0
 

Accepted Solution

by:
snooflehammer earned 0 total points
ID: 40623774
I ended up paying my web developer to do it. I didn't want to involve him for such a minor change but I couldn't get it to work.....

I really cannot see how he achieved it by looking at the code, but if you're curious, it's at www.phoenixeumundi.com.au
0
 

Author Closing Comment

by:snooflehammer
ID: 40641471
Website dev fixed it. I can't see what he did
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…

770 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