# Wondering if I could get some help with some minor HTML edits?



## Wolvenreign (Nov 8, 2015)

Hey, guys, I was wondering if anyone here could help me with some small HTML edits. Changing around the location of a video and an autoresponder and having a bit of trouble making it all click right.

Thanks in advance if you can spare a few minutes.


----------



## FAST6191 (Nov 8, 2015)

I do not know why we are in the art section but hey.

Anyway the extent of the HTML in this should be the embed code and whatever div you decide to put these in. You should be using CSS to change sizes, positions and alignment, indeed newer flavours of HTML will consider some of the HTML functionality for this to be deprecated (<center> is gone in HTML5 for instance). You can put the CSS in the div itself if you really want. HTML might have supported some of it at some point but it was always clunky in my experience.


----------



## BurningDesire (Dec 9, 2015)

FAST6191 said:


> I do not know why we are in the art section but hey.
> 
> Anyway the extent of the HTML in this should be the embed code and whatever div you decide to put these in. You should be using CSS to change sizes, positions and alignment, indeed newer flavours of HTML will consider some of the HTML functionality for this to be deprecated (<center> is gone in HTML5 for instance). You can put the CSS in the div itself if you really want. HTML might have supported some of it at some point but it was always clunky in my experience.


The <center> Tag still works in html 5. I use it because I am too stupid to know how to center text.


----------



## GamerzHell9137 (Dec 9, 2015)

BurningDesire said:


> The <center> Tag still works in html 5. I use it because I am too stupid to know how to center text.


It didn't work when i tried it.


----------



## ihaveahax (Dec 9, 2015)

BurningDesire said:


> The <center> Tag still works in html 5. I use it because I am too stupid to know how to center text.


CSS:

```
h1 {
    text-align: center;
}
```
in-line HTML:

```
<h1 style="text-align: center;">brickway</h1>
```
<center> is deprecated (i.e. you should stop using it).


----------



## AzureuzZetsunai (Dec 9, 2015)

GamerzHell9137 said:


> It didn't work when i tried it.



it depends on how you use it, if the Block is at width 100%, then its not going to work. Center tag center the block not the text, to center a text you either do the following:
-Have a parent div with the desired width, in this case 100%, the child object or text should have a display: inline-block property and margin: 0 auto.
-Have a text with width 100% and the property text-align: center


----------



## BurningDesire (Dec 9, 2015)

GamerzHell9137 said:


> It didn't work when i tried it.


Odd. Always does when I do.



ihaveamac said:


> CSS:
> 
> ```
> h1 {
> ...


Thanks!


----------



## AzureuzZetsunai (Dec 9, 2015)

ihaveamac said:


> CSS:
> 
> ```
> h1 {
> ...



Yup, deprecated but still works.


----------



## ihaveahax (Dec 9, 2015)

AzureuzZetsunai said:


> Yup, deprecated but still works.


probably since browsers will still allow the use of HTML 4 elements. I don't think <center> actually exists in HTML 5.

in any case, "but [it] still works" doesn't mean you _should_ be using it.


----------



## FAST6191 (Dec 9, 2015)

Edit and it seems a while conversation happened in the meantime. I will leave this reply up though.



BurningDesire said:


> The <center> Tag still works in html 5. I use it because I am too stupid to know how to center text.



http://www.w3.org/TR/html5/obsolete.html#non-conforming-features would say it is entirely obsolete and non conforming. Your browser may break from form or something to support it (or treat the doctype as a mild suggestion) or there may be something else going on (you might still be using an old version of HTML but the browser will support certain HTML5 tags) but it is gone if you follow the standards and try to use a conformance checking tool.

The CSS is not that hard though http://www.w3.org/Style/Examples/007/center.en.html
Sure it is not quite as easy as <center> </center> but do it a few times and you will get used to it, and then used to CSS as a whole which is a good thing. Better yet define it in a class in the CSS sheet or the page header rather than the element and you can make it happen even quicker. If your experiences with CSS are more walking up to a 3 year old wordpress install with 50 plugins and a lot of work done to a custom theme and trying to figure it out then yeah it is a nightmare (protip there -- firebug http://getfirebug.com/ , saved me endless aggravation there). It may seem the W3 folks are a bit puritanical in their quest to excise all style related content from HTML and punt it into CSS but it needed to be done.


----------



## CosmoCortney (Dec 9, 2015)

I use this:

```
style="margin-left: auto; margin-right: auto;"
```

in css

```
.any-class-name
{
margin-left: auto;
margin-right: auto;
}
```


----------



## ihaveahax (Dec 9, 2015)

CosmoCortney said:


> I use this:
> 
> ```
> style="margin-left: auto; margin-right: auto;"
> ...


this doesn't always have the same effect as text-align. I added a width property to make it more clear here. https://jsfiddle.net/5zqomLov/


----------



## CosmoCortney (Dec 9, 2015)

ihaveamac said:


> this doesn't always have the same effect as text-align. I added a width property to make it more clear here. https://jsfiddle.net/5zqomLov/


I thought it was needed to center a video


----------

