Solved

Displaying a widget in the right position on a web page

Posted on 2015-02-15
6
85 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
[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
  • 3
  • 2
6 Comments
 
LVL 36

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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
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…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

623 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