Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7648695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:46:55+00:00 2026-05-31T10:46:55+00:00

I have two sets of identical html and css files. One of which I’m

  • 0

I have two sets of identical html and css files. One of which I’m loading up through Rails’ index.html.erb file via a controller and all that, the other I’m running through my public folder as a control. The public index.html file looks fine:

Index in public directory

But when I run these exact same files in the rails index.html.erb file, it looks like this:

index.html.erb file

As you might be able to notice, the BETA text is slightly lower in the Rails build, and obviously the navigation list goes below my header element.

I’m admittedly a bit new at both css and rails, so this may be a known issue I’m unaware of. I tried searching for some insight but didn’t find any problems similar to this one. If anyone has a tip on how to resolve this I’d be very thankful!

EDIT: I’m including my index.html and style.css files in the following pastebins. They’re quite small, maybe a look at them could give some insight to you guys.

HTML: http://pastebin.com/wyYEN92n

CSS: http://pastebin.com/60xMe9YG

EDIT 2:

Found these two lines in the page source:

<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/home.css?body=1" media="all" rel="stylesheet" type="text/css" />

I’m thinking it is safe to assume that something in these css files is causing the discrepancy. I will investigate and report back.

EDIT 3:

Looks like neither of those css files actually do anything. I’m including the contents of both in this pastebin: http://pastebin.com/pbHwEp4w

As you can see it’s just commented stuff. What I did notice however, is that the page source has 2 html tags included in the same file. I’m pastebining that as well: http://pastebin.com/h4Rjqi4B

It goes

<html>//rails generated stuff</html> 
<html>//My stuff</html>

Could this be causing the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:46:57+00:00Added an answer on May 31, 2026 at 10:46 am

    With regards to edit #3: it looks like that is coming from the default layout in app/views/layouts/application.html.erb. By default, Rails will load that file and put all of the content from the view where <%= yield %> is specified. If you had additional <html>, <head>, etc. tags in your view file, they would be duplicated. You can learn more about layouts here. Also, take a look at the asset pipeline for how to structure your CSS files in the app.

    Like Ernest said, Rails is just delivering the HTML/CSS files, so the framework itself does not affect how the browser renders the content. However, the order in which the content is presented to the browser, of course, does matter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two sets of table that are identical. One for sales and one
I have two types of data sets. Both are in same size. One contains
If I have two identical sets, meaning a == b gives me True ,
I have two sets of jagged arrays, named P1 through P6 and Z1 through
Have two sets of data (two tables) for patient records, one 1999-2003, the other
In my Rails app, I have two models, Estimate and Client , which both
I have two sets of items, one that I have my jQuery treating the
I have two sets of lists (state lists) One called state_o and one called
I have two sets of web applications, one set running under Asp.Net 3.5 and
I have two sets of array containing 7 objects, with values in one and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.