I am new to this site and I don’t even know if I am posting in the right section, but here we go.
I am writing a simple HTML file with CSS attached, in HTML, I have a piece of code that looks like this:
<ul id="thing_list">
<li>
<div>
<header>
<h2>Name of the thing</h2>
<p>Some thing here</p>
</header>
<nav>
<ul id="actions">
<li>Edit</li>
<li>Move</li>
<li>Delete</li>
</ul>
<nav>
</div>
</li>
And CSS for this:
#thing_list li > div > nav li {
list-style-type: none;
display: inline;
vertical-align: bottom;
}
#actions li {
position: absolute;
bottom: 0;
}
So the question is, how do I name things better? Is it best to define an ID / Class for everything or define a few and use #thing_list li> div> nav li?
I'm not sure you guys can understand English is not my main language, so please bear with me.
source
share