-4

Can you rewrite my code table on the div so that it is the most optimal and consistent with the standards?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
sssss
  • 109
  • 1
  • 1
  • 10

2 Answers2

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
  • thanks a lot but from what I know writing the same divs is not too good
    – sssss Feb 24 '14 at 09:46
  • 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
  • Same DIVs? Couldn't get you? What do you mean by same DIVs? Explain? – Harsh Feb 24 '14 at 09:48
  • whether the use of so many divs is good? – sssss Feb 24 '14 at 09:53
  • @seweryns, looked at your HTML code, why don't you use the "Definition Lists". I mean using `
    ` `
    ` tags?
    – Kheema Pandey Feb 24 '14 at 09:54
  • 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..
    – Kheema Pandey Feb 24 '14 at 09:56
  • well it will create somebody code
    etc?
    – sssss Feb 24 '14 at 10:07
  • 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

Click here to see demo!

Kijan Maharjan
  • 1,031
  • 7
  • 14