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

The Archive Base Latest Questions

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

<style>/* foo */ body{color:red}div{color:green}</style> So, I have this <style> element. It has a comment,

  • 0
<style>/* foo */ body{color:red}div{color:green}</style>  

So, I have this <style> element. It has a comment, and then several CSS rules. It is my CSS reset code, so I would like to have it in one line, without a single line break inside the <style> element.

Is this OK with browsers?

  • 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-19T11:30:01+00:00Added an answer on May 19, 2026 at 11:30 am

    Sure it is. Whitespace is insignificant in CSS except in at-rules, as the descendant combinator, and when using it to separate property values (e.g. in shorthand properties), among other things.

    The CSS2.1 syntax documentation talks about the effect of whitespace (or lack thereof) on your CSS code.

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

Sidebar

Related Questions

This is the HTML I have: p_tags = '''<p class=foo-body> <font class=test-proof>Full name</font> Foobar<br
We have several wizard style form applications on our website where we capture information
I have the following style in an external CSS file called first.css table {
This is a question about style and design rather than syntax. I have domain
The following, in Firefox 3.6, simulates a modal overlay: <html> <body> <div id=modal style=position:
(Jeopardy-style question, I wish the answer had been online when I had this issue)
If I have a style defined .style1 { width: 140px; } can I reference
I want to select all descendant elements of the element with class=x this way:
Any way I can get this working? I have a block of code: <p><a
Given: require 'rubygems' require 'nokogiri' value = Nokogiri::HTML.parse(<<-HTML_END) <html> <body> <p id='para-1'>A</p> <div class='block'

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.