Regarding my previous question here . If I use the HTML below as part of my webpage, where there are likely to be many other div tags, how can I target these individual divs in my CSS? The pattern that I think works best [This Answer] [2].
I added identification attributes to make divs more accessible in the large HTML DOM ... I don't know how else to make them more distinguishable. If there is a better way to do this, please let me know. The goal is to apply CSS design to about 6 div tag elements on the portal website with a lot of points. If there is a more general way that will be cool, so I can easily add additional sections and use this format in the future ... I can add a class attribute for each element to which I want to apply formatting, but I don't know the syntax.
What is a professional web designer for this?
<div id="projectName">
Realtime Account Activiation
</div>
<div id="divAnnounce">
Announcements
</div>
I have
http://jsfiddle.net/eW532/1/
, , , . , html .
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.even_spacing { color: purple;
background-color: #d8da3d }
.first_letter { background:blue;
color:white;
padding:4px 0px 4px 5px;}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="first_letter even_spacing">
Realtime Account Activiation
</div>
<div class="first_letter even_spacing">
Announcements
</div>
</form>
</body>
</html>