Note that there are some explanatory texts on larger screens.

plurals
  1. POAlign <div> with bottom-right of parent <div>?
    primarykey
    data
    text
    <p>I have a couple groups of links at the top of a layout page for an MVC app, and I'm having trouble getting these links positioned properly.</p> <p>Here's what they SHOULD look like (I'm making some huge changes to this site, but keeping the layout intact):</p> <p><img src="https://i.stack.imgur.com/sSlDK.png" alt="enter image description here"></p> <p>Keep in mind that this photo is at the center-right of my page, that is to say, the page extends further to the right, but there's no content in that area.</p> <p>After altering these image-based links to text-based, they lose their styling integrity and scramble.</p> <p>Here's some code from my current links to give an idea of how they're contained:</p> <pre><code>&lt;div class="top-links"&gt; &lt;div id="top-nav"&gt; &lt;a class="top-link" href="#" title="My Profile"&gt; &lt;span&gt;MY PROFILE&lt;/span&gt; &lt;/a&gt; &lt;a class="top-link" href="#" title="Account Profile"&gt; &lt;span&gt;ACCOUNT PROFILE&lt;/span&gt; &lt;/a&gt; &lt;a class="top-link" href="#" title="Sign Out"&gt; &lt;span&gt;SIGN OUT&lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="links"&gt; &lt;div id="nav"&gt; &lt;a class="home-link home-link-left" href="#" title="My Component Books"&gt; &lt;span&gt;MY COMPONENT BOOKS&lt;/span&gt; &lt;/a&gt; &lt;a class="home-link" href="#" title="New Component Book"&gt; &lt;span&gt;NEW COMPONENT BOOK&lt;/span&gt; &lt;/a&gt; &lt;a class="home-link" href="#" title="System Logs"&gt; &lt;span&gt;SYSTEM LOGS&lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I left out pieces of the tags themselves for readability.</p> <p>And finally, the relevant CSS:</p> <pre><code>/*----------- TOP NAVIGATION -----------*/ .top-links { float: right; height: 31px; margin: 0 0 0 0; width: auto } .top-link { font: 7pt Georgia, serif; color: #E1915C; text-align:center; text-decoration: none; line-height: 34px; padding: 10px; } #top-nav { float: right; margin: 0 0 0 0; overflow: hidden; } /*----------- NAVIGATION -----------*/ .links { float: right; width: auto; height: 36px; overflow: hidden; bottom: 0; right: 0; } .home-link { font: 7.25pt Georgia, serif; color: #E1915C; text-decoration: none; font-weight: bold; border-right: 1px solid #E1E1E1; text-align: center; line-height: 36px; width: auto; padding: 10px; } .home-link:hover { color: #369AAA; } .home-link-left { border-left: 1px solid #E1E1E1; } .home-link-right { border-right: 1px solid #E1E1E1; } #nav { position: absolute; float: right; overflow: hidden; } </code></pre> <p>Sorry if it seems like a bit much, some of it isn't my original code and I'm not sure what I should/shouldn't include.</p> <p>I'm not the best with CSS, so could any styling gurus give me some insight on how I can make the links lay out as they are in the screenshot?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload