Align to the side of my site

Joined
Jun 14, 2018
Messages
109
Reaction score
1
hi all i'm avin trouble aligning this
to the left side of my site

Code:
<div align="left"><div id="cont_d754a00ac19e79e45957c9b0720b4f70"><script type="text/javascript" async src="https://www.yourweather.co.uk/wid_loader/d754a00ac19e79e45957c9b0720b4f70"></script></div></div>

i have tried <div align="left"> but it's not letting me


please help
 
Joined
Nov 13, 2020
Messages
302
Reaction score
38
I'm going to ask you to learn web programming properly and start over again at https://www.w3schools.com/

How do I know you need training?
Your ID is convoluted. It should give you some information about the DIV.
You placed JavaScript code in the DIV instead of at the end of the HTML code.
You program from the 1880's with type="text/javascript".
SO I wonder if you understand what using 'async' means and if it's necessary.

To answer your question:
<div align="left">
deals with the text that the DIV contains and not it's placement.
You should use CSS for placement. The Flex box or CSS Grid
Or position:left

You have to give all your code and not a snipit for a better answer. DIVs do not exist in a vacuum.
 
Joined
Jun 14, 2018
Messages
109
Reaction score
1
I'm going to ask you to learn web programming properly and start over again at https://www.w3schools.com/

How do I know you need training?
Your ID is convoluted. It should give you some information about the DIV.
You placed JavaScript code in the DIV instead of at the end of the HTML code.
You program from the 1880's with type="text/javascript".
SO I wonder if you understand what using 'async' means and if it's necessary.

To answer your question:
<div align="left">
deals with the text that the DIV contains and not it's placement.
You should use CSS for placement. The Flex box or CSS Grid
Or position:left

You have to give all your code and not a snipit for a better answer. DIVs do not exist in a vacuum.
i have been using w3schools.com look at our site http://coolvibes-reloaded.com
 
Joined
Jul 12, 2020
Messages
89
Reaction score
10
@big daddy - "You program from the 1880's with type="text/javascript"."
Actually the type attribute is correct. If you remember the type attribute for the script tag allows coders to use various "types" of embedded code such as python. Javascript just seems to be the default.
 
Joined
Jun 14, 2018
Messages
109
Reaction score
1
@big daddy - "You program from the 1880's with type="text/javascript"."
Actually the type attribute is correct. If you remember the type attribute for the script tag allows coders to use various "types" of embedded code such as python. Javascript just seems to be the default.
Thank you, infact I don't code from 80's I'm just experimenting!
 
Joined
Mar 11, 2022
Messages
226
Reaction score
32
Well @strawbs. You've read all the critics. And sorry to say that, but that's true.

Bad habit and shuldn't be done nowadays is something like that:
Code:
<div style="mystyle and so on and so on"></div>
which you did several times on your site.

Should be something like that
Code:
<div class="mycssclass"></div>

But that's just minor issues.

First of all you really shoul learn a little bit of CSS.
Im not even talking about media querys because it looks like you give a damn about mobile devices and responsivity. Im talking about the basics only. And in your state of knowlege it's kind of hard to tell you where to start. Because you already did a "site" which for sure used a lot of effort and time. So by basics im talking about position, padding, margin.

Anyway, ill give it a try. Maybe you learn a bit out of it.

There's a bunch of position types that can be used. But i will stick with the BIG THREE if you will.

relative, absolute, fixed. Those are the most common used types of position.

relative: It's in it.s name. Relativ position to it's parent element (your body is a element to)
absolute: It's in it.s name too. Absolute position to it's parent element (your body is a element to)
fixed:And again, as it says. Fixed position (kind of) over all.

Short example:
Code:
<style>
#myMaindiv{position:relative; width:100%; text-align:center; background-color:green; color:red; font-size:1.8rem;}
.myBlackball{position:absolute; cursor:pointer; top:100px; left:50%; width:30px; height:30px; border-radius:30px; border:2px solid #CCCCCC; background-color:black; box-sizing:border-box; transition: background-color 1s;}
.myBlackball:hover{background-color:white;}
.imfixed{position:fixed; left:30%; top:70%;}
</style>
<div id="myMaindiv">#myMaindiv requires a element with the id of myMaindiv and can be used (or should be used) only once
      <div class="myBlackball"></div>  <div class="imfixed">Im inside myMaindiv, but can be anywhere on the site.</div>
</div>

Try it, google it and then, if you want to, come back for more.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top