TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-08-2008, 08:01 AM   #1 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default how to make this into a table format using css

hello,

i'm working on my portfolio and what i'm trying to do is

look in the content area on this page http://www.sarmenhb.com/new/

i'm trying to display the items stacked up horizontally to be stacked vertically as if placed horizontally. but it wont work,

i tried placing it into li elements and displaying it inline but that wont work... how can i do this? i know it can be done within a table but iwant to try doing it witout a table.

let me know what i can do

thanks.
__________________
no signature set
sarmenhb is offline  
Reply With Quote
Old 12-08-2008, 11:27 PM   #2 (permalink)
The Contributor
 
Join Date: Oct 2008
Posts: 75
Thanks: 4
9three is on a distinguished road
Default

I'm not sure if I understand you correctly but you want to stack around 4 "items" horiztonal and keep stacking them vertically? Something like this:

Section 1 | Section 2 | Section 3 | Section 4
---------------------------------------------------
Section 5 | Section 6 | Section 7 | Section 8

If thats the case, you can setup 2 DIVs width around 800px-1000px or so and *IN* the DIV create 4 more DIVs, one for each section. Finally, repeat the same thing for the bottom section except it will be right under the first 4. Hope this helps. Let me know if you need more help.
9three is offline  
Reply With Quote
Old 12-11-2008, 02:22 AM   #3 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

If what you mean is as 9three, just want a list that would go vertical after a certain quantity of horizontal elements, you could have a simple list like this:

HTML Code:
<style type="text/css">
ul#section{margin:0; padding:0; 400px;}
 ul#secion li{margin0; padding:0; width:100px; display:block; float:left;}
.clear{clear:both; height:0;}
</style>

<ul id="section">
    <li>item1</li>
    <li>item2</li>
    <li>item3</li>
    <li>item4</li>
    <li>item5</li>
    <li>item6</li>
    <li>item7</li>
    <li>item8</li>
    <div class="clear"></div>
</ul>
of course the width of the ul = (width of li)*(number of li's in a line)
tony is offline  
Reply With Quote
Old 12-11-2008, 02:58 AM   #4 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default

hi, thanks to both of your replies

i tried tony's and 9three's suggestions and its not turning into a table look. can you take a look and see if i might be doing something wrong?

basically what i want is something like this


Security | SEO | W3C Compliancy
--------------------------------
handicap | Tables | Cross-Browser

just like 9three guessed

thanks for your suggestions

btw, i uploaded the page to sarmenhb.com
__________________
no signature set
sarmenhb is offline  
Reply With Quote
Old 12-11-2008, 03:33 AM   #5 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

my bad, I forgot that you need to clear (put a <div class="clear"></div>) for every 3 li's or as many elements you want to show per line: it would look like this:

HTML Code:
<style type="text/css">
body,td,th {font:13px/1.6em "Helvetica Neue", Helvetica, Arial, sans-serif; color: #ccc;}
body {background:#585855; margin:0; padding:0;}

h3{color:#ff9827;}
.clear{clear:both; display:block; height:0px; width:100%;}
ul#aspects{margin:100px auto 100px; padding:0; list-style:none; list-style-position:inside; width:660px;}
 ul#aspects li{margin:0; padding:0 10px 10px; width:200px; float:left;}/* total width=witdh+padding=220px*/
</style>

<ul id="aspects">
    <li>
        <h3>Security</h3>
        <p>With the increased levels of website penetration that exists today I am up to date with the latest techniques to guard against such attacks and allowing clients to stay at ease knowing their confidential account information is safely guarded.</p>
    </li>
    <li>
        <h3>Search Engine Optimization</h3>
        <p>the competition grows it becomes harder for clients have their websites rank higher in popular search engines such as google, yahoo, and many more. But with my experienced techniques in which i have learned through trial and error i found ways to rank a clients website so that it can gain the popularity with the required</p>
    </li>
    <li>
        <h3>W3C Compliancy</h3>
        <p>After i am completed with a project i verify the website against W3C's requirements to assure the website is running as clean as possible with or witout errors which allows the domain to rank higher than other domains that relate to the website.</p>
    </li>
    <div class="clear"></div>
    <li>
        <h3>Handicap Friendly</h3>
        <p>It is important not only to me but a majority of the audience for a website to be handycap friendly. a handicap friendly website is one that can be used by people who have a disability who would not be able to use the website through the normal way and can be used thourgh the special way.</p>
    </li>
    <li>
        <h3>table-less design</h3>
        <p>Text goes here.</p>
    </li>
    <li>
        <h3>Cross-Browser Compliant</h3>
        <p>All designs and programming that is produced through me are verified against popular and non-popular browser and made sure that they are rendered the same way for everyone no matter what browser they are using.</p>
    </li>
    <div class="clear"></div>
</ul>
Also I think, and this is a personal opinion, that is pointless that the site is using framesets and just one frame, when the main reason to use frames is to include different parts of a webpage and only change the "content" part. But in the site is just one frame accessing one page, so you could make your code clearer by just using that page to begin with then trying to access it with the conglomeration of all that frame stuff.
Instead you can just keep it simple with (X)HTML and add that functionality of including just certain html code with PHP.

that's just my point. I don't even know if I made it across right :P

Last edited by tony : 12-11-2008 at 03:40 AM. Reason: add opinion
tony is offline  
Reply With Quote
Old 12-11-2008, 04:13 AM   #6 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default

thanks dude! exactly what i was looking for, you rock.
__________________
no signature set
sarmenhb is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading data form table to table? code_junkie Absolute Beginners 5 11-06-2008 03:34 PM
Lookups table drewbee Advanced PHP Programming 0 07-15-2008 08:21 PM
viewing an image from a table in a database sarmenhb General 2 02-12-2008 11:18 AM
Need your feedback Tanax Absolute Beginners 29 10-11-2007 04:50 PM
How to check if a table exists? Haris General 8 09-19-2007 09:04 PM


All times are GMT. The time now is 04:09 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design