Forcing layout using CSS

Suspended
Joined
18 Oct 2002
Posts
9,479
Hello all.

As I mentioned in my recent thread regarding web hosting, I haven't touched web design for at least 3 years. I have basically forgotten everything I knew about HTML and PHP etc.

I am in the process of securing a domain and a web host ATM, and have found an old code archive from my web site.

Looking at it, I can see that I forced the layout using Tables, as was the standard back then. I understand that things have since moved on, and people now use CSS to force layout.

Can someone please explain simply how I'd achieve this in practice? I'd be grateful for some very basic code examples as well if possible. My site (just to give you an idea) is essentially a centered rectangle split into two. The upper portion is 90% of the total area and is where the content is displayed. The lower portion is split into 6 seperate boxes (side by side) to hold the navigation images.

TIA.

P.S. The way the site used to work was that I used PHP to dynamically call together the main part of the page containing the navigation and background colours etc. and the content which would be a seperate static HTML document. Can I still do this if using CSS to force layout? Logic tells me yes, but I want to make sure.
 
Soldato
Joined
18 Oct 2002
Posts
5,464
Location
London Town
The Mad Rapper said:
Can I still do this if using CSS to force layout? Logic tells me yes, but I want to make sure.
Yes. The method used to generate the markup is irrelevant. The CSS is interpreted on the client side (by the browser), so it will only ever see the fully-formed document and won't be aware that PHP is generating it dynamically.
 
Suspended
OP
Joined
18 Oct 2002
Posts
9,479
Augmented said:
Yes. The method used to generate the markup is irrelevant. The CSS is interpreted on the client side (by the browser), so it will only ever see the fully-formed document and won't be aware that PHP is generating it dynamically.

That was what I thought, but I am grateful you've confirmed it. Thank you!
 
Back
Top Bottom