There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: CSS fluid problem


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
pandapete's Avatar
Member with 40 posts.
 
Join Date: Aug 2006
Location: Cairns, Australia
Experience: Learning every day
29-Oct-2006, 02:25 AM #1
Solved: CSS fluid problem
Hi all.

I am having trouble with getting a fluid layout in my header that I am designing.

The page layout is using a 3 column fluid layout using CSS that is working perfectly.

I have created a sliced header and used Image Ready to create the HTML and CSS.

The header will not resize automatically when different screen resolutions are applied.

I have tested the header container in the page layout with a border-right and it is resizing correctly, however, when a border-right is used on the header image container div (that is,the div.Table_01), it is not resizing, despite being set at 100%.

There is the 'useless' area in the middle of the header slice that I want to expand and contract depending upon the screen resolution. I have set it at 100%, set the image at 100%, and even tried a 1px trans.gif

The main header image container will not resize.

How can I fix this.

Here is the HTML code

Code:
<div id="header">  // This div is generated by the 3 col layout
//  This is the start of the header slice
  <div class="Table_01">
	<div class="header-01">
		<img src="images/header_01.gif" width="150" height="120" alt="">
	</div>
	<div class="header-02">
		<img src="images/header_02.gif" width="100%" height="200" alt="">
	</div>
	<div class="header-03">
		<img src="images/header_03.gif" width="600" height="120" alt="">
	</div>
	<div class="header-04">
		<img src="images/header_04.gif" width="150" height="80" alt="">
	</div>
	<div class="header-05">
		<img src="images/header_05.gif" width="600" height="80" alt="">
	</div>
  </div>  
</div>
and this is the CSS code for the header slice

Code:
div.Table_01 {
	position:relative;
	left:0px;
	top:0px;
	width:100%;
	height:200px;
	border-right: 1px solid #000;
}

div.header-01 {
	position:absolute;
	left:0px;
	top:0px;
	width:150px;
	height:120px;
}

div.header-02 {  /*this is the slice I want to be fluid*/
	position:absolute;
	left:150px;
	top:0px;
	width:100%;
	height:200px;
}

div.header-03 {
	position:absolute;
	left:400px;
	top:0px;
	width:600px;
	height:120px;
}

div.header-04 {
	position:absolute;
	left:0px;
	top:120px;
	width:150px;
	height:80px;
}

div.header-05 {
	position:absolute;
	left:400px;
	top:120px;
	width:600px;
	height:80px;
}
What am I doing wrong.

Thanks
pandapete's Avatar
Member with 40 posts.
 
Join Date: Aug 2006
Location: Cairns, Australia
Experience: Learning every day
29-Oct-2006, 07:47 AM #2
Hi again.

I think that I have worked it out. (Mum's angry as I should be in bed for school tomorrow).

Foranyone with the same problem, how I sorted it was to call the slices to the right of the container that I wanted to expand and reduce to 'float: right;'. Ithen positioned them using a negative value to position them in relation to the right border.

This may not be the correct way to do this, and I welcome anyone who knows the proper wayto pull me up and letme know how it should be done properly.

Thanks all.

Panda.
Reply


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

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

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

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:53 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.