Question

I can't set my menu to be aligned all the way to the right of the page, and my footer links also. Here's what I have http://prntscr.com/32snbr and this is what I want http://prntscr.com/32snrm

This is my html, please help

<head>
    <title>Index</title>
    <meta name="description" content="Lab exercise 4">
    <meta name="keywords" content="FINKI, Lab Exercise, Web design">
    <style>
    body{
    background-color: #F5F5F5;
    color: #4f8295;
    }

    li
    {   
    float:left;     
    }
    ul.foot{
    display:inline; 
    list-style-type:none;
    }   
    </style>
</head>

<body>
    <div style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 0;   margin-bottom: 0; max-width: 62.5rem; background: #fff; padding: 15px;"> 
        <div style="display:inline-block; width:49%;">
            <img src="ukim-logo-9.png"/>
            <img src="finki-logo-9-en.png"/>
        </div>
            <div style="display: inline-block; vertical-align: top; width: 50%; text-align: left; float:right; padding-top:15px;"> 
                <ul class="foot">
                    <div style="display: inline-block; vertical-align: top; margin-left: auto; margin-right: auto; padding-top:15px;">  
                        <li><a style="background-color: #008cba; text-decoration: none; border-color: #007295; color: white; padding: 15px;" href="http://127.0.0.1:8020/Lab4/lab4.1.html">Home</a></li>
                    </div>
                    <div style="display: inline-block; vertical-align: top; margin-left: auto; margin-right: auto; padding-top:15px;">  
                    <li><a style="background-color: #008cba; text-decoration: none; border-color: #007295; color: white; padding: 15px;" href="http://127.0.0.1:8020/Lab4/lab4.2.html">News</a></li>
                    </div>
                    <div style="display: inline-block; vertical-align: top; margin-left: auto; margin-right: auto; padding-top:15px;">  
                    <li><a style="background-color: #008cba; text-decoration: none; border-color: #007295; color: white; padding: 15px;" href="http://127.0.0.1:8020/Lab4/lab4.3.html">Contact</a></li>
                    </div>
                    <div style="display: inline-block; vertical-align: top; margin-left: auto; margin-right: auto; padding-top:15px;">  
                    <li><a style="background-color: #008cba; text-decoration: none; border-color: #007295; color: white; padding: 15px;" href="#about">About</a></li>
                    </div>
                </ul>
            </div>

        <hr style="border: solid #dddddd; border-width: 1px 0 0; clear: both; margin: 1.25rem 0 1.1875rem; height: 0;">

    <div style="display: inline-block; width: 65%; padding-left: 20px;">
            <div style="display: inline-block; width:100%">
                <h1 style="font-size: 40px; margin-bottom:0;">Get in touch</h1>
                <h3  style="margin-top:0;">Contact content</h3>
            </div>
            <div style="display: inline-block; width:100%; ">
                <p >Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet 
                    dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper 
                    suscipit lobortis nisl ut aliquip ex ea commodo consequat. 
                </p>
                <p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu 
                    feugiat nulla facilisis at vero eros et accumsan 
                    et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. 
                    Nam liber tempor cum soluta nobis eleifend option congue. 
                </p>                        
            </div>

        </div>

        <div style="display: inline-block; width: 30%;vertical-align: top">
            <div style="display: inline-block; ">
                <p>Map</p>
                    <img style=" display: inline-block; padding-right: 20px; max-height: 100%; max-width: 100%" src="gmaps.JPG">
                <p>Awesome St. <br>1000 Skopje, MK</p>
            </div>
        </div>  

        <hr style="border: solid #dddddd; border-width: 1px 0 0; clear: both; margin: 1.25rem 0 1.1875rem; height: 0;">

        <div>
            <div style="display: inline-block; width: 100%;">
                <div style="display: inline-block; width: 50%;">
                    <footer>
                        <span>&copy; Faculty for Computer Science and Engineering - Skopje</span>                       
                    </footer>
                </div>
                <div style="display: inline-block; width: 49%; text-align: right; "> 
                    <ul class="foot">
                        <li><a style="padding: 15px" href="http://127.0.0.1:8020/Lab4/lab4.1.html">Home</a></li>
                        <li><a style="padding: 15px" href="http://127.0.0.1:8020/Lab4/lab4.2.html">News</a></li>
                        <li><a style="padding: 15px" href="http://127.0.0.1:8020/Lab4/lab4.3.html">Contact</a></li>
                        <li><a style="padding: 15px" href="#about">About</a></li>
                    </ul>
                </div>
            </div>
        </div>              

    </body>
Was it helpful?

Solution

Try adding this to your style section

.footerright{
align: right; 
}

Then add replace what you have in the footer with this.

<div class="footerright">
    <ul class="foot">
        <li><a style="padding: 15px" href="http://127.0.0.1:8020/Lab4/lab4.1.html">Home</a></li>
        <li><a style="padding: 15px" href="http://127.0.0.1:8020/Lab4/lab4.2.html">News</a></li>
        <li><a style="padding: 15px" href="http://127.0.0.1:8020/Lab4/lab4.3.html">Contact</a></li>
        <li><a style="padding: 15px" href="#about">About</a></li>
    </ul>
</div>

OTHER TIPS

<div style="width: 100%; margin-left: 5px; margin-top: 0px; margin-bottom: 0px; max-width: 62.5rem; background: #fff; padding: 15px;"> 
    <div style="display:inline-block; width:49%;">
        <img src="ukim-logo-9.png"/>
        <img src="finki-logo-9-en.png"/>
    </div>
</div>
<div style="display: inline-block; margin-right: 5px; vertical-align: top; width: 50%; text-align: right; float:right; padding-top:15px;"> 
    <ul>
        <div style="display: inline-block; vertical-align: top; margin-left: auto; margin-right: auto; padding-top:15px;">  
            <li><a style="background-color: #008cba; text-decoration: none; border-color: #007295; color: white; padding: 15px;" href="http://127.0.0.1:8020/Lab4/lab4.1.html">Home</a></li>
        </div>
        <div style="display: inline-block; vertical-align: top; margin-left: auto; margin-right: auto; padding-top:15px;">  
        <li><a style="background-color: #008cba; text-decoration: none; border-color: #007295; color: white; padding: 15px;" href="http://127.0.0.1:8020/Lab4/lab4.2.html">News</a></li>
        </div>
        <div style="display: inline-block; vertical-align: top; margin-left: auto; margin-right: auto; padding-top:15px;">  
        <li><a style="background-color: #008cba; text-decoration: none; border-color: #007295; color: white; padding: 15px;" href="http://127.0.0.1:8020/Lab4/lab4.3.html">Contact</a></li>
        </div>
        <div style="display: inline-block; vertical-align: top; margin-left: auto; margin-right: auto; padding-top:15px;">  
        <li><a style="background-color: #008cba; text-decoration: none; border-color: #007295; color: white; padding: 15px;" href="#about">About</a></li>
        </div>
    </ul>
</div>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top