css and php

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

css and php

Post by sayee3k1 »

hai

i am building a site using php and new to php.

but i can't set alll my menu and body parts together.

what i am getting is at http://sai.zer0host.com/index.php

i used this as my css

body {

background-color: white;
font-family: courier;
font-size: 13px;
color:black;
margin:1px;
padding-bottom:20px;
scrollbar-face-color: 00406A;
scrollbar-highlight-color: BDBAE7;
scrollbar-3dlight-color: B3AEDB;
scrollbar-darkshadow-color: 000000;
scrollbar-shadow-color: 18188C;
scrollbar-arrow-color: F9BE05;
scrollbar-track-color: DEDFF7;
border:0px
}

#header { width:100%;
height:208px;
background:white;
border:px solid ;
}

#mainbody {width:70%;
margin-top:1px;
margin-left:5px;
margin-right:5px;
margin-left:120px;
padding-top:5px;
padding-right:5px;
padding-bottom:5px;
padding-left:20px;
background:;
border:1px solid #004898;
}

#menu { width:30%;
margin-top:1px;
margin-left:5px;
margin-right:1px;
position:absolute;
top:208px;
left:0px;
width:120px;
background:white;
color:black;
border:1px solid #004898;
text-align: center;
}

#menuitem
{ color:black;
text-align: center;
}



#footer { width:100%;
text-align:center;
margin-top:5px;
padding:1px;
background:white;
color:black;
border:1px solid #004898;
}

a:hover { font-size:14px;
background-color:yellow;
color:darkblue}

h1 { font-size:30px}

h2 { font-size:24px}

h3 { font-size:20px}

p,h1,h2,h3 { margin: 10px 10px 10px 10px}

.heading { font-family:Lucida Calligraphy;
font-size:36px;
background-color:yellow;
color:blue;
font-weight:bold;
text-align: center}



what is the fault in that I have used no tables in the body and menu

I want the css file like

http://iamchilledout.cjb.net/

if possible do suggest some solution

urs
sai
basdog22
Forum Contributor
Posts: 158
Joined: Sun Nov 30, 2003 3:03 pm
Location: Greece

Post by basdog22 »

I think it has something to do with positioning. Try relative for the menu layer
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post by no_memories »

#header {
/* You need to set a position */

position: absolute;
top: 10px;
left: 100px;

/* You can also use % value but that is not recommended for positioning divs unless you are familiar with relative positioning. */


/* You can put containers (div) inside each other and place them relative to one another. Experiment. */

width:100%;
height:208px;
background:white;
border:px solid ;
}
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post by no_memories »

For your best information on CSS specifications see the W3C site:

Start Here --> CSS 1 - http://www.w3.org/TR/REC-CSS1-961217.html

CSS 2 - http://www.w3.org/TR/CSS2/
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

Thanks

Post by sayee3k1 »

hai

Thanks for that but now i am facing another problem .

i want a three column layout and i have posted a query again .

it will be really coool if u can take a loook at that ..

any kind of suggestions will be reallly helpful

thanks..........

urs
sai
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post by no_memories »

ok,

Let me get this straight. You want your layout with the content in the middle and the menus on each side? Which of the two sites do you want to work with? Do you want to import the look of the second link into the 1st link?

I'm not sure why you have a frameset to begin with in the second link. For a CSS layout, that is not needed.

From what I can see, you're importing a page into a frameset. I'm not entirely sure why you are doing this?

Anyway,

Is this what you're trying to accomplish?

--- header material --- <-- top row

--- body container which contains content and menus --- <-- 2nd row

--- left menus --- content --- right menus --- <-- 3 cols Inside 2nd row

--- other stuff like footer and such --- 3rd row and beyond

This can be done without tables and framesets. Positioning menus and such with tables is not recomended if you want to use CSS for layout. It's kind of an either/or scenario. Tables are ok for certain things, and are typically used today in 99% of websites for layout, although that method is not recommended by the W3C. The W3C recommends going to CSS layouts using the <div> and using tables for data structure.

I can rough out your layout in CSS if you like, but you might need to get used to not using tables. Just let me know what it is you would like to do.

I need to know what exactly, in detail, what you need to accomplish.
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

PLease don't use any frameset!!
CSS + DIV == YOUR FRIENDS
;)
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

Post by sayee3k1 »

Hai buddy

Hope u r fine and doing great .......

I also visitied u r website it is toooo coool and beautifully aligned.

I want almost the same thing u specified.I want that my php webpage shuld adjust to the screen resolution.

the main problem is that My header is a flash movie with a picture and i have to specify the width of the movie otherwise the flash movie becomes very small.but if I specify the width then it won't adjust according to the screen resolution.

then yes i want the screen layout like this

--> first row shuld have the header it is a html file

--> second row shuld have three columns

- leftmost column shuld have menu (html file) , counter and bookmark(script)
- middle column will contain the junk i want to write plus a box with few script programs like moving the screen .

- the right most column will contain php scrits like finding the ip adress , another box for finding the weather info .

--> the third row will contain the footer .


yes i am calling the html files in the frame which i am specifying in the css.
by border 1.

what i have in my body section is

<p> what ever i write </p> tats it.........

and i save it as html and call it from index.php .

Can i add the html and body tag to it and then specify a border around that and then call it from index.php .

and also when i call the php files before the html files in the index.html it doesn't work . y is that do i need to code it differently.

I will be reallly grateful to you if u can give me the hint how to approach this .

Thanks a lot for alll u r support.........

urs
sai
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post by no_memories »

ok,

I've been busy today and will look into it tomorrow.

I have a good idea of what you want to do.

The way you should approach this is by having a main index.php file that calls chuncks of code from other directories or even a database. But I am not too familiar with databases, yet.

Give me a day to look at it and another day to rough out the code and explain it for you.
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

cooool

Post by sayee3k1 »

Thanks a lot for ur positive reply...........

I will also be working on that......

the site is http://sai.zer0host.com

urs
sai
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post by no_memories »

Ok,

Here is a very roughed out version of the link you provided. I don't have too much time to spend debugging it for cross-browser stability, but it generally works.

Example --> disengaged

Here is a zip file containing all the files. These files point to your domain minus the flash and images missing from my server. Also, I set up directories to put things like images, style sheets, content, menus, and of course the shockwave module. This is to better organize your site.

Zip --> disengaged

If I'm ever in Texas, maybe you could buy me a meal at Red Lobster? hehe.. I love grilled teriyaki salmon.

Updated: I'm taking down the above links. There's no point in keeping them active.
Last edited by no_memories on Fri Feb 20, 2004 7:42 am, edited 2 times in total.
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

HEY U R GREAT

Post by sayee3k1 »

HEY

U MADE MY DAY OR RATHER I SHULD SAY LIFE!!!!!!!

I HAVE NO WORDS TO THANK YOU...........

IT WILLL HELP ME A LOT........

I AM GETTING EMOTIONAL now will mail u again....

URS
SAI
Post Reply