midwestdv Posted March 2, 2018 Report Share Posted March 2, 2018 Hi! First post on this site. I finished the HTML course and just finished the CSS course a few days ago. I'm taking a few week off before I start javascript to practice HTML and CSS. So, here is what I want to know: I have an id called #main and an id called #css-table. Is there a way to put both of those in one div like <div id="main" "css-table"> or would <div id="main" id="css-table"> work? I was playing around with both and could not get either one to work. Thanks. Quote Link to comment Share on other sites More sharing options...
administrator Posted March 2, 2018 Report Share Posted March 2, 2018 There are few ways to handle this. First rule, you can't apply two IDs to a tag. IDs have to be unique. So I would use one ID to apply all your CSS to the tag in question. Or a class if you plan on using the CSS rules more than once in a page. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.