• april-rose

    (@april-rose-1)


    Hi πŸ™‚

    I have this code to make buttons, but I’d like to put them on the same line. How do I do this?

    Button code:

    <div class=”bloglink-bg”>

    <h2>Button Text Here</h2>

    </div>

    Thanks heaps,
    April

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter april-rose

    (@april-rose-1)

    <div class="bloglink-bg">
    <a href="http://link-goes-here.com">
    <h2>Button Text Here</h2>
    </a>
    </div>
    wanderingbedou

    (@wanderingbedou)

    Hi April,

    I suggest you read up on the concept of CSS floats. Example link:
    http://www.w3schools.com/css/css_float.asp

    Sorry I couldn’t provide the exact code, but this is outside the scope of this section of the forum.

    Best regards

    Thread Starter april-rose

    (@april-rose-1)

    Thank you. I’m just not too sure what I would use for the first word – ‘img’

    img {
        float: right;
    }

    I tried putting ‘bloglink-bg’ but I don’t think that’s it :/

    wanderingbedou

    (@wanderingbedou)

    Hi April,

    I’ll add that you should read up on CSS as well, since it looks like you’re new to setting up styling on a website.

    Just as a quick hint, you will not be applying the float to the img tag as you have shown. If you do that, all images would be “floating”,

    Instead, apply it to the div class you will use for the buttons. According to the example you gave, it would be

    .bloglink-bg {
    float: right;
    }

    Here’s a starter tutorial for you get better acquainted with what needs to be done:
    http://www.w3schools.com/css/

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Buttons on same line’ is closed to new replies.