Solved

Displaying a widget in the right position on a web page

Posted on 2015-02-15
6
69 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&amp;uniq=715&amp;locationId=7683847&amp;lang=en_AU&amp;border=true&amp;shadow=true&amp;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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to Import and export files in 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 : Click on Too…

707 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

13 Experts available now in Live!

Get 1:1 Help Now