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.
.
.
.
<div id="header">
<span
id="site-title"><h1>Hamster</h1></span>
<span id="user-links"><h2>Sign Up | Log In
</h2></span>
<div class="clear"></div>
</div>
.
.
.
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?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
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* - Web-developer tool bar http://sumanthtechsavvy.blogspot.com/2006/04/mozilla-extensions-1.html On Wed, Mar 11, 2009 at 3:48 PM, Adam Akhtar < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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. > > . > . > . > <div id="header"> > <span id="site-title"><h1>Hamster</h1></span> > <span id="user-links"><h2>Sign Up | Log In </h2></span> > <div class="clear"></div> > </div> > . > . > . > > 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? > -- > Posted via http://www.ruby-forum.com/. > > > >-- -- Thanks & Regards, Sumanth Krishna. A +358 40 3276564 Blogs: TwinclingCommunity: http://sumanthtechsavvy.blogspot.com/ http://www.twincling.org/node/227 http://yourway2health.blogspot.com/ http://www.osef.twincling.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 http://www.sitepoint.com/books/cssdesign1/ http://oreilly.com/catalog/9780596518776/ ~Jeremy -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---