Can you rewrite my code table on the div so that it is the most optimal and consistent with the standards?
Asked
Active
Viewed 285 times
-4
-
Your question is not clear to me. What do you mean by `code table`? – Rahul Desai Feb 24 '14 at 09:36
-
i.e. how convert table to div – sssss Feb 24 '14 at 09:38
-
AFAIK you need to do it manually. – Rahul Desai Feb 24 '14 at 09:39
-
By using the correct markup, what are you trying to accomplish? – Nick R Feb 24 '14 at 09:40
-
I mean, can you rewrite my code table on the div so that it is the most optimal and consistent with the standards? and give me ready code – sssss Feb 24 '14 at 09:41
2 Answers
0
Giving you the most basic layout:(P.S. Haven't tried it in browser)
HTML:
<div>
<div class = "forumline bigRow" >
<div class="cat row">
{FORUM_NAME}
</div>
<div class="cat row">
{FORUM_DESC}
</div>
</div>
</div>
CSS:
.bigRow{width:100%;}
.row{width: 100%;}
P.S: This works when I use twitter Bootstrap in my project very well.

Harsh
- 1,665
- 1
- 10
- 16
-
-
What do you mean writing the same divs, classes are supposed to be flexible, and therefore re-usable. – Nick R Feb 24 '14 at 09:46
-
-
-
@seweryns, looked at your HTML code, why don't you use the "Definition Lists". I mean using `
- ` `
- ` tags?
-
hearing this for first time. But how I work or advised to work acc. to standards is for each row there should be a div but for data/text inside you can use or
or
, anything. Really your choice after that.
– Harsh Feb 24 '14 at 09:54 -
Use the appropriate markup. Think about whether you need to use ``s, or is there a more semantic tag to markup your content..– Nick R Feb 24 '14 at 09:54
-
I would recommended using `
- ` definition list suits for the layout you made..
-
-
here http://stackoverflow.com/questions/83073/why-not-use-tables-for-layout-in-html Read this for more explanation on this type of structure. Welcome. – Harsh Feb 24 '14 at 10:33
0
Here's what i've created for you.
<ul class="forumline">
<li><span class="gensmall_new_h1">{FORUM_NAME}</span></li>
<li><span class="gensmall_new">{L_TAGS}: {SEOTAGS}</span></li>
</ul>
Here's the css for it
.forumline {background:#fff; padding:3px; list-style: none;}
ul.forumline li{background-color:#e7e7e7;border-bottom: 1px solid #c7c7c7; padding: 10px; }
ul.forumline li:hover{background-color:#fff;border-bottom: 1px solid #c7c7c7; padding: 10px; cursor: pointer; }
ul.forumline li:first-child{border-top: 4px solid #333;}
Other wise you can also use other plugins like http://bit.ly/OsLoYO

Kijan Maharjan
- 1,031
- 7
- 14