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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:21:01+00:00 2026-05-28T18:21:01+00:00

One of my biggest trouble with CSS has always been how tricky it is

  • 0

One of my biggest trouble with CSS has always been how tricky it is to position stuff appropriately.

Now matter how hard I try to understand things, I always need a couple of tries before I can guess which must be floatted in which direction related to what.

Now, my trouble is, I usually at some point have code like this :

<div class="someContainerThatWillWorkAsALine">
  <div class="someOtherContainerThatWillWorkAsAcolumn">
    <div class="StuffInAcolumn">
      ...
    </div>

The only purpose of classes like this is to say :

  • “child, please go from left to right”
  • “except you guys, please go from top to bottom”
  • “you, stop disturbing your brother and go 5px to the left, you’re grounded”
  • “johnny, you’re the last of your breed, please clear all those floating nonsense”

I sometimes come to wonder if I’m writing software, or trying to find the right way to turn the antenna to receive old-style analog TV.

“Ok, just a little more to the right, please…
No, not quite there yet.
Perfect now, don’t move !”

Besides, those classes have no real semantic, so it’s very hard to give them a meaningful name. This makes CSS pretty hard to read, and, even worse, pretty hard to write because I get a panic attack every time I have to choose a name for “yet-another-class-that-simply-tells-a-block-to-act-as-a-line”. Because as every class name is global to your web2.0-y-one-page-site, you don’t want to collide with used names.

So how do you tackle this kind of problems ?
Do you :

  • leave the “positioning” (layout?) css code inline with your html, and restrict CSS to actual styling (as in “this should be blue, this should be written in bold, etc…”) ?
  • simply have one “act-as-a-line” and “act-as-a-column” class (meaning your html code contains classes that only deals with layout), which kinda defeats the “keep layout out of my html” spirit ? And give a more meaningful class for other cases ?
  • use a convention for the names ?

Any ideas welcome.

  • 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-28T18:21:04+00:00Added an answer on May 28, 2026 at 6:21 pm

    I understand your pain, but the more you use CSS/html the easier it becomes. To the point that you end up loving it.

    Is it worth separating “style” from “layout” in CSS

    Yes, absolutely! If you use a layout framework you won’t have all those crazy classes. Then you can concentrate on style. Both the layout and styles will be in a CSS file.

    Never inline style – maintain the useful separation of concerns.

    This article addresses why the separation of concerns will benefit your website long-term.

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

Sidebar

Related Questions

This has been one of the biggest obstacles in teaching new people ColdFusion. When
I've been using Markdown recently. One of my biggest problems with Markdown is that
One of biggest interest right now is iPhone development. I'm fixing to start putting
I'm new to programming/development and I'm having trouble installing development tools.One of my biggest
Traits have been one of the biggest additions for PHP 5.4. I know the
From my previous questions about gettext, one of the biggest benefits of using PHP's
One of my (my team's) biggest peeves with VS2008 is the slow speed in
One of my biggest issues dealing with a move from Java to .Net is
I've recently started trying to increase my sites performance. One of the biggest obstacles
I've been working with jQuery for a while, but now I want to write

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.