Jump to content

Recommended Posts

Posted

hello

 

just curious about two things:

 

1. when setting style sheets, I have seen it written in two ways, div#blahblah and #blahblah so what is the difference if there is one?

 

thanks!

Posted (edited)

If you use div#blahblah, that style will only be applied to <div> tags with the id "blahblah" but if you use #blahblah, that style will be applied to any tag that has the id "blahblah" - although theoretically that wouldn't happen, because an id should be unique, meaning you shouldn't have two elements with the same id in the same page. :)

Edited by TCH-Raul
Posted

ok gotcha thanks. div#blahblah would only be <div id="blahblah"> as opposed to #blahblah which can either be <div id="blahblah"> or <table id="blahblah">

 

correct?

Posted

I am sooooooo confused! :) :)

Posted
ok gotcha thanks. div#blahblah would only be <div id="blahblah"> as opposed to #blahblah which can either be <div id="blahblah"> or <table id="blahblah">

 

correct?

I was wondering the same thing. Now I am starting to understand this whole CSS thing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...