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

Discussion in 'GBAtemp Art Studio' started by Wolvenreign, Nov 8, 2015.

  1. Wolvenreign
    OP

    Wolvenreign Transhuman Satanist Furry Technocrat

    Member
    629
    72
    Jul 7, 2008
    United States
    Indianapolis, IN
    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.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,877
    9,786
    Nov 21, 2005
    United Kingdom
    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.
     
  3. BurningDesire

    BurningDesire GBAtemp Psycho!

    Member
    4,964
    5,825
    Jan 27, 2015
    United States
    Behind a screen reading news
    The <center> Tag still works in html 5. I use it because I am too stupid to know how to center text.
     
  4. GamerzHell9137

    GamerzHell9137 GBAtemp Psycho!

    Member
    3,833
    1,687
    Nov 1, 2011
    Bosnia and Herzegovina
    It didn't work when i tried it.
     
  5. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,513
    6,109
    Apr 20, 2015
    United States
    Tigard, OR
    CSS:
    Code:
    h1 {
        text-align: center;
    }
    in-line HTML:
    Code:
    <h1 style="text-align: center;">brickway</h1>
    <center> is deprecated (i.e. you should stop using it).
     
    Last edited by ihaveamac, Dec 9, 2015
  6. AzureuzZetsunai

    AzureuzZetsunai HAHA, 20!... i punch it!

    Member
    135
    13
    Nov 16, 2011
    Mexico
    Chihuahua
    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
     
  7. BurningDesire

    BurningDesire GBAtemp Psycho!

    Member
    4,964
    5,825
    Jan 27, 2015
    United States
    Behind a screen reading news
    Odd. Always does when I do.

    Thanks!
     
  8. AzureuzZetsunai

    AzureuzZetsunai HAHA, 20!... i punch it!

    Member
    135
    13
    Nov 16, 2011
    Mexico
    Chihuahua
    Yup, deprecated but still works.
     
  9. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,513
    6,109
    Apr 20, 2015
    United States
    Tigard, OR
    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.
     
  10. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,877
    9,786
    Nov 21, 2005
    United Kingdom
    Edit and it seems a while conversation happened in the meantime. I will leave this reply up though.

    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.
     
    BurningDesire likes this.
  11. CosmoCortney

    CosmoCortney The Hacker Furry

    Member
    1,601
    1,519
    Apr 18, 2013
    Germany
    on the cool side of the pillow
    I use this:
    Code:
    style="margin-left: auto; margin-right: auto;"
    in css
    Code:
    .any-class-name
    {
    margin-left: auto;
    margin-right: auto;
    }
    
     
    Last edited by CosmoCortney, Dec 9, 2015
    BurningDesire likes this.
  12. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,513
    6,109
    Apr 20, 2015
    United States
    Tigard, OR
    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/
     
    BurningDesire likes this.
  13. CosmoCortney

    CosmoCortney The Hacker Furry

    Member
    1,601
    1,519
    Apr 18, 2013
    Germany
    on the cool side of the pillow
    I thought it was needed to center a video :D