Jump to content

How to change object possition HTML.

Toyota AE86
Go to solution Solved by minibois,

Depending on the complexity of the project, this might just run fine:

<div align="right">
This text is now aligned to the right.
</div>

You can just place this div where ever inside your HTML body. If you are gonna center align a ton of text, you can consider making a CSS file with this outlined in there.

Hello

I wanted to know how to move this

<a href="file:///D:projekty/HTML/Strona2.html">TUTAJ JEST LINK</a>

onto the right side of my web site, something like <centre> command, but instead of moving the text to the centre of the site to it's right edge.

Link to comment
Share on other sites

Link to post
Share on other sites

Depending on the complexity of the project, this might just run fine:

<div align="right">
This text is now aligned to the right.
</div>

You can just place this div where ever inside your HTML body. If you are gonna center align a ton of text, you can consider making a CSS file with this outlined in there.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

There are a lot of ways to move boxes in html, and all of those use css.
Best way to learn that stuff is to understand grid system and box model. 

box model https://www.w3schools.com/css/css_boxmodel.asp ; https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model

Grid system: https://css-tricks.com/snippets/css/complete-guide-grid/ ; https://www.w3schools.com/css/css_grid.asp

Link to comment
Share on other sites

Link to post
Share on other sites

On 5/14/2019 at 8:59 PM, Minibois said:

Depending on the complexity of the project, this might just run fine:


<div align="right">
This text is now aligned to the right.
</div>

You can just place this div where ever inside your HTML body. If you are gonna center align a ton of text, you can consider making a CSS file with this outlined in there.

Yes, that works, but it's not a good style.

 

HTML files should contain the content,

CSS contains then layout and look

and JS contains the functionality

 

What OP is looking for would be a CSS statement like

a {
  float: right;
}

 

75% of what I say is sarcastic

 

So is the rest probably

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, myselfolli said:

Yes, that works, but it's not a good style.

 

HTML files should contain the content,

CSS contains then layout and look

and JS contains the functionality

 

What OP is looking for would be a CSS statement like


a {
  float: right;
}

 

That's why I said depending on the scope of the project, this would be fine.

Since no additional information was provided I suggested the most easy option and the proper option (suggesting using CSS).

 

I mean I could have complained about OP using an absolute path, instead of a relative path.. But I assumed this would be a simple college project, where these things might not matter.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Minibois said:

That's why I said depending on the scope of the project, this would be fine.

Since no additional information was provided I suggested the most easy option and the proper option (suggesting using CSS).

 

I mean I could have complained about OP using an absolute path, instead of a relative path.. But I assumed this would be a simple college project, where these things might not matter.

True.

 

But for learning purposes I'd still recommend doing it 'properly'

75% of what I say is sarcastic

 

So is the rest probably

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×