Skip to main content
Participant
March 8, 2020
Question

Align [widget] script results

  • March 8, 2020
  • 2 replies
  • 502 views

I am realitvley new to Dreamweaver and I am trying to aligh a script that is a wether widget. The script returns the correct infomration, but I cannot seem to get it to alight in the body. I want to align it to the left side, but I am having no luck. What is the trick to alight the results? Thanks in advance for your help. 

 

THIS IS WHAT I HAVE....I removed the <div alignemt = "left"> so this is it with nothing around it trying to aligh it. This is code from a template page that I have at this time. I have not made any other modificatinos to it. 

 

<hgroup>
<h3>Header Content Region</h3>
<h4>Insert text, image or banner ads here, or just delete this text and leave this area blank!</h4>
</hgroup>
<script type='text/javascript' src='https://darksky.net/widget/default/35.1976,-79.4625/us12/en.js?width=200%&height=160&title=28374&textColor=333333&bgColor=transparent&transparency=true&skyColor=undefined&fontFamily=Times New Roman&customFont=&units=us&htColor=333333&ltColor=C7C7C7&displaySum=yes&displayHeader=yes'></script>

This topic has been closed for replies.

2 replies

Nancy OShea
Community Expert
Community Expert
March 8, 2020

This widget is NOT responsive so I cannot recommend it in production. 

 

That said, use some CSS positioning.  I'm using inline styles here for expediency.  Normally you would add CSS to your custom stylesheet.

 

<div id="widget-wrapper" style="position:relative">
<div id="dark-sky-widget" style="position:absolute; top:10px; left:0">

<script type='text/javascript' src='https://darksky.net/widget/default/35.1976,-79.4625/us12/en.js?width=200%&height=160&title=28374&tex... New Roman&customFont=&units=us&htColor=333333&ltColor=C7C7C7&displaySum=yes&displayHeader=yes'></script>

</div>
</div>

 

Nancy O'Shea— Product User & Community Expert
GWM1Author
Participant
March 8, 2020

Thanbk you both for the responses. Just so I am clear for my own learning- what would I put in the CSSheet? Just trying to learn. 

 

 

 

Nancy OShea
Community Expert
Community Expert
March 8, 2020

In CSS, unique IDs are prefixed with a hash tag #. 

 

#widget-wrapper {position:relative}

#dark-sky-widget {position:absolute; top:10px; left:0}

 

Nancy O'Shea— Product User & Community Expert
BenPleysier
Community Expert
Community Expert
March 8, 2020

Dreamweaver is a tool to help you create websites. The question that you are asking is not a Dreamweaver question, but one that you should be asking Dark Sky. To help you on your way, please go to https://darksky.net/help/website

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!