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 3788622
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:01:43+00:00 2026-05-19T12:01:43+00:00

I have a set of Styles that were first created inside the style attribute

  • 0

I have a set of Styles that were first created inside the style attribute on a page.

I want to move it from being on the page itself into a stylesheet.

however, when I move it to a .css file, the page breaks, move the code back to the html doc and it works fine again.

This makes absolutely no sense, moving styles from a style to a css file shouldnt break the code should it?

Am I missing something? I am not changing any of the code, its simply a copy and paste.

  • 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-19T12:01:44+00:00Added an answer on May 19, 2026 at 12:01 pm

    This is just a shot in the dark as (at the time of this post) you haven’t provided source code.

    Make sure you’re linking to your stylesheet using a link tag in the head of the HTML document.

    If you had:

    <style type="text/css">
    /* <![CDATA[ */
    #someid
    {
      margin: 0;
      padding: 3px 12px;
    }
    /* ]]> */
    </style>
    

    You’ll need to have

    #someid
    {
      margin: 0;
      padding: 3px 12px;
    }
    

    in your CSS file with:

    <link rel="stylesheet" type="text/css" href="path/to/style.css" />
    

    to link to the stylesheet.

    Some common newbie mistakes include:

    • <style type="text/css" src="path/to/style.css">: because it’s a similar syntax to the <script> tag, which would make sense, but is invalid
    • <link rel="stylesheet" src="path/to/style.css">: but link elements use href not src
    • placing link elements within the body: although browsers will tend to manage link elements in the body, there are likely going to be some errors, and it’s not a defined behavior
    • not specifying a doctype declaration: allows the browser to go into quirks mode, which is never a good idea.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UITableView that uses the UITableViewCellStyleDefault style. I also have set the
I have created my first asp.net UserControl that I will use in several places
I have a UISegmentedControl on a black UIToolbar. I have set the style to
I have a set of Java 5 source files with old-style Doclet tags, comments
I have a MySQL database set-up in a hierarchy style. There are 4 tables
I have a TComboBox on a form. Its Style property is set to csDropDownList.
I have set up 2 servers which are linked. From my LOCAL SERVER, I
I am trying to sort a list of records that have been created using
I have create a simple grid that retrieves data from a server through php.
I have created a simpleSli.de from http://www.simplesli.de but I cant figure out how to

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.