# View and css - two floats in div arent level

**URL:** <https://www.ruby-forum.com/t/view-and-css-two-floats-in-div-arent-level/162574>\
**Category:** Rails\
**Created:** [March 11, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/view-and-css-two-floats-in-div-arent-level/162574 "2009-03-11T14:48:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scudco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@scudco](https://www.ruby-forum.com/u/scudco)\
**Post date:** [March 11, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/view-and-css-two-floats-in-div-arent-level/162574/1 "2009-03-11T14:48:34Z")

</div>

Im new to rails and html and css. Ive read through tutorials but cant  
get this to work.

I have a navbar which has the site name on the left and then some nav  
links on the right ( for now the links are just text placeholders). The  
site title font is larger than the nav link font and the two wont line  
up on the row. It seems they are being lined up via their tops and not  
their bases.

.  
.  
.

# Hamster

## Sign Up | Log In

. . .

and css

- {  
padding: 0px;  
margin: 0px;  
}

h1 {  
font-family:“Georgia,serif”;  
font-size: 4em;  
}  
h2 { font-size: 2.5em;}  
h3 {font-size: 1.5em;}  
p {font-size: 1.1em;}

body {  
font-family: Arial,Helvetica,sans-serif;  
font-size: 80%;  
background: #339120 ;  
}

#header {  
color:white;

```
    }

```

#site-title {  
float: left;  
width: 30%;  
}

#user-links {  
float: right;  
width: 69%;  
text-align: right;  
}

can anyone tell me where im going wrong on this?

---

<div class="post-metadata">

**Author:** ![scudco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@scudco](https://www.ruby-forum.com/u/scudco)\
**Post date:** [March 11, 2009, 3:06pm UTC](https://www.ruby-forum.com/t/view-and-css-two-floats-in-div-arent-level/162574/2 "2009-03-11T15:06:35Z")

</div>

few quick tips:

all headers by default would add some padding and this would result in  
text  
moving to top.

Another best way for you to debug such simple issues are, to install  
few  
addons.  
On firefox you can very well use:

- Firebug: _[https://addons.mozilla.org/en-US/firefox/addon/1843](https://addons.mozilla.org/en-US/firefox/addon/1843)_

- Web-developer tool bar  
[TechSavvy: Mozilla Extensions #1](http://sumanthtechsavvy.blogspot.com/2006/04/mozilla-extensions-1.html)

On Wed, Mar 11, 2009 at 3:48 PM, Adam A. \<  
removed\_email\_address@domain.invalid\> wrote:

> .
> 
> }  
> #header {  
> width: 69%;  
> text-align: right;  
> }
> 
> ## can anyone tell me where im going wrong on this?
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

## –

Thanks & Regards,  
Sumanth Krishna. A  
+358 40 3276564

Blogs:  
TwinclingCommunity:

> **[TechSavvy](http://sumanthtechsavvy.blogspot.com/)**
>
> Technical Blog

[http://www.twincling.org/node/227](http://www.twincling.org/node/227)

[http://yourway2health.blogspot.com/](http://yourway2health.blogspot.com/)  
[http://www.osef.twincling.org](http://www.osef.twincling.org)

---

<div class="post-metadata">

**Author:** ![scudco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@scudco](https://www.ruby-forum.com/u/scudco)\
**Post date:** [March 11, 2009, 4:30pm UTC](https://www.ruby-forum.com/t/view-and-css-two-floats-in-div-arent-level/162574/3 "2009-03-11T16:30:11Z")

</div>

This isn’t a rails issue, so you probably won’t find much help.

You have a couple of "no no"s in your css to start.

I am going to recommend some books for you

> **[The CSS3 Anthology, 4th Edition | SitePoint Premium](https://www.sitepoint.com/premium/books/the-css3-anthology-4th-edition/)**
>
> The CSS3 Anthology: Take Your Sites to New Heights is a compilation of answers, how-to’s, and examples for all your CSS questions. Complete with ready-to-use downloadable code examples, the fourth edition of this bestselling book has been completely...

> **[Learning Rails](https://www.oreilly.com/library/view/learning-rails/9780596154943/)**
>
> While most books written about Rails cater to programmers looking for information on data structures, Learning Rails targets web developers whose programming experience is tied directly to the Web. Rather … - Selection from Learning Rails \[Book\]

~Jeremy
