473,776 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

avoiding white space between elements

hello,
I've made a template which has the layout I want, but there is an undesired
white space between the left elements and the right column. How can I remove
it?
Thank you
Bye!!

Here's the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<style type="text/css">
div.container
{
width:100%;
margin:0px;
border:1px solid gray;
/*line-height:150%;*/
float:left;
}
div.header
{
border: 1px solid #000000;
padding:0px;
color:white;
background-color:gray;
background-position:top left;
background-repeat: none;
height: 131px;
width: 561px;
float:left;
}
div.titoli
{
border: 1px solid #000000;
padding:0px;
margin:0px;
color:white;
background-color:gray;
background-position:top left;
background-repeat: repeat-y;
height: 20px;
width: 561px;
float:left;
}
div.right
{
border: 1px solid #000000;
padding:0px;
margin:0px;
color:white;
background-color:gray;
background-position:top left;
background-repeat: repeat-y;
position:relati ve;
width: 239px;
height: 600px;
float:right;
}
div.contenuti
{
/*border: 2px solid #000000;*/
padding:0;
margin:0px;
color:white;
background-color:gray;
background-position:top left;
background-repeat: repeat-y;
}
</style>
<title>Untitled </title>
</head>
<div class="containe r">
<div class="right"></div>
<div class="header"> </div>
<div class="titoli"> </div>
<div class="contenut i"></div>
</div>
</html>

--
elimina unsampdoriano per rispondere via email
Jul 21 '05 #1
1 4330
I'm not sure what you're trying to do - did you want the layout to be fixed
or fluid (i.e. grow to the size of the browser window). You've specified a
fixed width for the header and title, and the side bar on the right. As the
container has a fluid width of 100%, its the container that will grow to the
size of the window, which is why you get the gap between the two.

If you want a fixed width, then you could change the container width from
100% to 804px (width of header + borders + width of right sidebar +
borders). However, this isn't very good, as it would be too wide for users
running lower resolutions.
If you want a fluid layout, then you have to decide if the header, contents,
or right sidebar, or a combination should grow horizontally to fit the
browser window.

I recommend you buy 'Web Standards Solutions: The Markup and Style
Handbook'. It's got a chapter on layouts which are very similar to what you
are trying to do.

P.S. You'll want to use a proper DOCTYPE as well, otherwise browsers will go
into quirks mode, and you'll get all sorts of headaches.

"Generale Cluster" <al************ ***@unsampdoria nosoftmasters.n et> wrote in
message news:cu******** **@newsreader.m ailgate.org...
hello,
I've made a template which has the layout I want, but there is an
undesired
white space between the left elements and the right column. How can I
remove
it?
Thank you
Bye!!

Here's the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<style type="text/css">
div.container
{
width:100%;
margin:0px;
border:1px solid gray;
/*line-height:150%;*/
float:left;
}
div.header
{
border: 1px solid #000000;
padding:0px;
color:white;
background-color:gray;
background-position:top left;
background-repeat: none;
height: 131px;
width: 561px;
float:left;
}
div.titoli
{
border: 1px solid #000000;
padding:0px;
margin:0px;
color:white;
background-color:gray;
background-position:top left;
background-repeat: repeat-y;
height: 20px;
width: 561px;
float:left;
}
div.right
{
border: 1px solid #000000;
padding:0px;
margin:0px;
color:white;
background-color:gray;
background-position:top left;
background-repeat: repeat-y;
position:relati ve;
width: 239px;
height: 600px;
float:right;
}
div.contenuti
{
/*border: 2px solid #000000;*/
padding:0;
margin:0px;
color:white;
background-color:gray;
background-position:top left;
background-repeat: repeat-y;
}
</style>
<title>Untitled </title>
</head>
<div class="containe r">
<div class="right"></div>
<div class="header"> </div>
<div class="titoli"> </div>
<div class="contenut i"></div>
</div>
</html>

--
elimina unsampdoriano per rispondere via email

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2230
by: StopBsod | last post by:
Hello group, I use XSLT to output a unix shell script based on the content of an XML file : The XSLT : <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template name="haut" match="/rhythmdb">
17
9130
by: Stanimir Stamenkov | last post by:
Is it possible to make two inline elements to appear adjacent stripping any white space appearing in between in the source? Example: <span class="adj">1</span> <span class="adj">2</span> <span class="adj">3</span> --
5
12350
by: Applebrown | last post by:
Hello, basically, I'm just learning intermediate CSS and trying to convert my old table webpage completely to CSS. Hoorah, right? Well, it's not quite going as planned. It's an extremely simple layout, and I'm finding myself stuck with small white space in between my images where I planned for the graphics to be stacked up right on top of one another. Here's the simple vertical layout: width is 640px, centered with a CSS border. I'd...
20
1001
by: Stephen Poley | last post by:
People in these groups, and on web-pages, not infrequently suggest that it is worthwhile cutting down on white-space and comments in HTML and CSS in order to reduce loading times. I and others have more than once doubted this, given the data-compression in the HTTP protocol. Having seen it suggested again a couple of times in the last few days, I decided it was time for a test on the effect of white-space. I took one of my pages:...
3
9018
by: Simon Dean | last post by:
Hello! Im looking to try and get into CSS for formatting my sites. Seems like a nice premise, and should allow easier design for the future. But gees, Im having a hard time of it. I would like to create something like at http://www.blargle.co.uk or http://www.celebrityresearcher.co.uk without the tables. I figure should be easy, to have two DIV rows, 100% width, and then have
38
24009
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with font) Woudl some of the space character in unicode work? (my html files uses unicode) Xah
2
6643
by: shagy | last post by:
Hi, I'm having a problem with a <select><option> which has white space in values... When I post the data I only get the first word (up to the white space). "Testing white space" becomes "Testing" after posting code... <select name="descr" id="descr">
4
2844
by: Don Miller | last post by:
When an ASP.NET 2.0 web page is rendered with multiple web controls hidden from view (.visible=false) there is a noticeable gap between a rendered element (like a table) and the next visible element (e.g. a button). When I look at the HTML source code there is nothing there except white space (see below). First of all, I thought browsers ignore white space and condense it down to one space, but most of all, how can controls be hidden...
1
4427
by: bdbeames | last post by:
I am currently getting some forecast data from a web site using (file_get_contents), then I'm using explode to put the string in an array, which I am then parsing. The trouble is when I use explode() are several empty elements between each full one. Example. Array ( => this => is => => => a => => => test ) If I print the sting before I explode it I only see one space between each word, but the it seems to be that there is more...
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.