Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 107,471 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 1,568 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



A few issues with migrating PHP with CSS

 
Reply to this topicStart new topic

A few issues with migrating PHP with CSS, Inside: How do I display the current tables with a database and how to

livelonger87
post 25 Jun, 2008 - 06:32 AM
Post #1


New D.I.C Head

*
Joined: 27 May, 2008
Posts: 18


My Contributions


Sorry for the long description. Anyway, I'm trying to display a list of current tables within a database. The issue: I'm not sure how I would do that :confused:

I only know how to display the details within a row of the table, not the current tables within a database.

It should appear similar to this...
Database => Tables();
|_Users[]
| |_______Username[]
| |_______Password[]
| |_______Email[]
|
|_User[]
|_______Friends_list[]
|_______Messages[]

Anyway, the other issue is; scaling <div> tags with the content within a page. I mean, I would rather have a <div> tag that fits in with the content that's contained within it, rather than having the content displaying outside it, if it goes over the height and width of the tag.

I'm not sure whether it's the way I'm designing them :confused:
I keep designing my pages like this...
CODE

<html>
<head>
<style type="text/css">
body
{
background-color: #CCCCCC;
}
#content
{
position: relative;
top: 300px;
left: 400px;
height: 650px;
width: 800px;
background-color: orange;
border: 2px solid black;
}
#withincontent
{
position: relative;
top: 320px;
left: 420px;
height: 300px;
width: 300px;
background-color: #E6E6E6;
border- 2px solid black;
}
</style>
</head>
<body>
<div id="content">
Withincontent will be displayed below... <br>
<div id="withincontent">
This
is
within
content
</div>
If
I
scale
this
text
down,
it
goes
over
the
div
</div>
</body>
</html>


I'm not sure how to fix this issue :confused:

Oh, and also!!
I don't understand how to check if a table doesn't exist :confused:
CODE

If($tablename What here? Doesn't exist)
{
print "You cannot remove <b>$tablename</b>, as it does not exist within the current database: <b>$dbname</b>.<br>";
}


This post has been edited by livelonger87: 25 Jun, 2008 - 06:43 AM
User is offlineProfile CardPM

Go to the top of the page


grimpirate
post 25 Jun, 2008 - 12:30 PM
Post #2


D.I.C Head

Group Icon
Joined: 3 Aug, 2006
Posts: 143



Thanked 3 times

Dream Kudos: 375
My Contributions


If you give a div a height and width and the content is more than that, it will spill out. That's just how it works. However, if you want to retain that size and you happen to have more content you can include "overflow: auto;" into your divs which will enable scroll bar on the div's frame. Read more here:
http://www.w3schools.com/Css/pr_pos_overflow.asp

This post has been edited by grimpirate: 25 Jun, 2008 - 12:31 PM
User is offlineProfile CardPM

Go to the top of the page

livelonger87
post 25 Jun, 2008 - 02:42 PM
Post #3


New D.I.C Head

*
Joined: 27 May, 2008
Posts: 18


My Contributions


QUOTE(grimpirate @ 25 Jun, 2008 - 12:30 PM) *

If you give a div a height and width and the content is more than that, it will spill out. That's just how it works. However, if you want to retain that size and you happen to have more content you can include "overflow: auto;" into your divs which will enable scroll bar on the div's frame. Read more here:
http://www.w3schools.com/Css/pr_pos_overflow.asp

Thank you!!:D:D
There's one problem solved. However, I forgot to mention another issue...
Firefox 2/3 - My tables aren't working within <div>'s :confused: ;They work in IE7 however... but within Firefox or Safari, they don't seem to want to correspond with the CSS/Div's.
User is offlineProfile CardPM

Go to the top of the page

grimpirate
post 25 Jun, 2008 - 05:49 PM
Post #4


D.I.C Head

Group Icon
Joined: 3 Aug, 2006
Posts: 143



Thanked 3 times

Dream Kudos: 375
My Contributions


Without actual markup and corresponding css its difficult to diagnose your table issue. However, this is a page from my own personal project Mimesis.
http://mimesis.110mb.com/adrot.html
And it's a table contained within a div which works just fine across all browsers.
User is offlineProfile CardPM

Go to the top of the page

livelonger87
post 26 Jun, 2008 - 04:10 AM
Post #5


New D.I.C Head

*
Joined: 27 May, 2008
Posts: 18


My Contributions


QUOTE(livelonger87 @ 25 Jun, 2008 - 02:42 PM) *

QUOTE(grimpirate @ 25 Jun, 2008 - 12:30 PM) *

If you give a div a height and width and the content is more than that, it will spill out. That's just how it works. However, if you want to retain that size and you happen to have more content you can include "overflow: auto;" into your divs which will enable scroll bar on the div's frame. Read more here:
http://www.w3schools.com/Css/pr_pos_overflow.asp

Thank you!!:D:D
There's one problem solved. However, I forgot to mention another issue...
Firefox 2/3 - My tables aren't working within <div>'s :confused: ;They work in IE7 however... but within Firefox or Safari, they don't seem to want to correspond with the CSS/Div's.

I'm drawing my tables through this method...
CODE

<html>
<head>
<style type="text/css">
#forma {
background-color: #E6E6E6;
width: 250px;
height: 250px
position: relative;
top: 250px;
left: 250px;
border: 2px black dotted;
}
</style>
</head>
<body>
<div id='forma'>
<form action="test.html" name="forma" id="test" method="post">
<table>
<tr>Username: <input type="text" name="username" id="username"></tr>
<tr>Password: <input type="text" name="password" id="password"></tr>
</table>
</div>
</body>
</html>


I'm not sure why it's not working :confused:
However, it works fine in IE7, but other browsers don't want to correspond with the method :\

User is offlineProfile CardPM

Go to the top of the page

grimpirate
post 26 Jun, 2008 - 12:06 PM
Post #6


D.I.C Head

Group Icon
Joined: 3 Aug, 2006
Posts: 143



Thanked 3 times

Dream Kudos: 375
My Contributions


I would suggest you use an HTML and CSS validator to check your tags. For instance:
QUOTE
<div id='forma'>
<form action="test.html" name="forma" id="test" method="post">
<table>
<tr>Username: <input type="text" name="username" id="username"></tr>
<tr>Password: <input type="text" name="password" id="password"></tr>
</table>
</div>
Should be the following:
QUOTE
<div id='forma'>
<form action="test.html" name="forma" id="test" method="post">
<table>
<tr>
<td>Username:</td>
<td><input type="text" name="username" id="username"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="text" name="password" id="password"></td>
</tr>
</table>
</form>
</div>
If you want to do it the way you were showing then there's really no need for a table as using divs or paragraphs would be equivalent:
QUOTE
<div id='forma'>
<form action="test.html" name="forma" id="test" method="post">
<div or p>Username: <input type="text" name="username" id="username"></div or /p>
<div or /p>Password: <input type="text" name="password" id="password"></div or /p>
</form>
</div>
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/29/08 12:23AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month