Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CSS

Featured Replies

Quick question. Does it matter how much CSS coding I use to style one thing on a basic multi page website? The tutorials I'm using suggests typing all the html out without any from of styling so everything sits down the left hand side, then to use div id's and CSS to stye it how you want it. I'm just worried that I have too many div id's to get the desired effect, or does it not really matter?

 

Thanks.

well think why it's called a cascading style sheet, your ideal is to have things so there is the bare minimum on the final element etc

Remember too that you can use classes and within ID's.

I'm just worried that I have too many div id's to get the desired effect, or does it not really matter?

 

 

As with all aspects of web development, you should be looking at the most efficient CSS code if possible, and eliminate any unnecessary code.

 

Just remember, the style element of a div 'id' will be applied to that div only, whereas the style element of a div 'class' can be applied numerous divs.

Edited by oakleaves

Build the HTML first, then apply styles is the general principle.

 

But it entirely depends from what starting point your coding.

 

When I get a design, I generally get a bit of paper and map out the basic structural areas I'll need - header, nav, content, side column, content boxes, footer etc.

 

I then code the entire thing in HTML with all text content from the design, validate it and proceed to the graphics slicing, dicing and finally the CSS.

 

How much css is too much?

 

Depends on the complexity of the design, however, the good old DRY principle applies here - Don't Repeat Yourself.

 

This is why taking notes whilst looking at a design *before* coding anything is vital.

Identify all areas that share common characteristics and make use of the cascade to simplify your css.

CSS helps to separate content from presentation.

  • 2 weeks later...
  • Author

Thanks for the responses guys. I went back to my CSS sheet and trimmed it all, and in the process solved a different issue I had!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.