• When i use <center> code in my website it gives a big line break.
    I want it to be normal.

    My code.
    1 <center>Test</center> 2

    Output.

    1
    
    Test
    
    2

    I want it normal like this.
    1 Test 2

    I know it has something to do with .css
    Im investigating right now but really cant find a problem.
    Maybe someone had same problem?

    Thanks hopes someone can help me.

    • This topic was modified 7 years, 1 month ago by autox420.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    <center> creates a new line.

    It seems you want a 3 column layout where the center column’s text is centered.

    So, something line

    <div class="left-div">1</div><div class="center-div">test</div><div class="right-div">2

    with the CSS

    .center-div {
        width: 80%;
        text-align; center;
        display:inline-block;
    }
    .left-div, .right-div {
         width: 10%;
         display:inline-block;
    }

    Note: I haven’t test this so if it doesn’t work exactly, it may need tweaking.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    The <center> tag has long been deprecated and you ought to be using CSS to handle the alignment of text.

    If that’s not possible then try adding this to your “Additional CSS” section of the dashboard:

    
    center {
        display: inline;
    }
    

    https://codex.www.ads-software.com/CSS#Custom_CSS_in_WordPress

    Thread Starter autox420

    (@autox420)

    I will test this.
    But isnt there a universal .css for <center> ?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    It seems you want a 3 column layout where the center column’s text is centered.

    In this case please refer to Steve’s advice.

    Thread Starter autox420

    (@autox420)

    None of the solutions solved my problem.
    Wierd.
    Well im testing more stuff.

    Gonna answer if i need anything.

    I think it also has something to do with <span> cause you codes puts everything to the left.
    And i cant see any span ( ) .css in the style.css

    • This reply was modified 7 years, 1 month ago by autox420.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to a page on your site where we can see this. Thanks.

    Thread Starter autox420

    (@autox420)

    [moderated to remove login

    I’m am 100% sure you mean well but please never offer credentials on these forums.

    https://make.www.ads-software.com/support/handbook/forum-welcome/#the-bad-stuff

    Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.]

    The code im using right now.

    <img src="https://i.imgur.com/4aVC16a.png" style="margin:0px;"/></a> <center><img src="https://i.imgur.com/ThnwQDG.png"style="margin:0px;"title="test"></center> <a href="https://test/wp-admin"><img src="https://i.imgur.com/JpbnJ51.png" style="margin:0px;"/></a>

    Removing margin:0px; doesnt help either.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘has big line break.’ is closed to new replies.