473,728 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

block element layout - how?

hello there. i am asking for a little help with creating layout like
this:

13px 500px 13px
..------------------------------------------------------------.
| | | | | | 13px
|----+----------------+ center area. +----------------+----|
| | empty space. | main website | empty space. | |
| | height and | window. | height and | |
| | width depends | | width depends | |
| | on the center | | on the center | |
| | area. | | area. | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
|----+----------------+ +----------------+----|
| | | | | |13px
'------------------------------------------------------------'

\--------------------------. .----------------------------/
\/
100% width

i was trying many of possibilities, trying to solve it for all evening
but with no luck... ;(
always some part of it is wrong (in IE almost always). if someone could
spare his free time and take a look on this i would be really really
grateful.

regards.

Jan 23 '06 #1
19 1708
Els
waste wrote:
hello there. i am asking for a little help with creating layout like
this:

13px 500px 13px
.------------------------------------------------------------.
| | | | | | 13px
|----+----------------+ center area. +----------------+----|
| | empty space. | main website | empty space. | |
| | height and | window. | height and | |
| | width depends | | width depends | |
| | on the center | | on the center | |
| | area. | | area. | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
|----+----------------+ +----------------+----|
| | | | | |13px
'------------------------------------------------------------'

\--------------------------. .----------------------------/
\/
100% width

i was trying many of possibilities, trying to solve it for all evening
but with no luck... ;(
always some part of it is wrong (in IE almost always). if someone could
spare his free time and take a look on this i would be really really
grateful.


What you want wrt to the width is no problem:

html:
<div id="container" >
<div id="page">
Your actual page content here
</div>
</div>

css:
body{
margin:0;
padding:13px;
}
#container{
text-align:center; /* for Win-IE5 */
}
#page{
width:500px;
margin:0 auto;
text-align:left; /* countering the value above */
}

What you want in height isn't that easy: at the top it's simple, but
to make all pages stop at 13px from the bottom, regardless of the
height of the content or the height of the browser window is
impossible imo. There are ways to get pages to extend till the bottom
of the window when they're too short, but not reliably cross browser,
and I don't think I've come across a way to include a 13px empty space
at the bottom yet. (not tried very hard though)

Just give it up and start thinking in web pages instead of rectangular
boxes with margins.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jan 23 '06 #2
waste wrote:
hello there. i am asking for a little help with creating layout like
this:

It's a basic 3 column layout. What, specifically, have you tried? And
and URL showing your best efforts would help a lot.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jan 23 '06 #3
waste wrote:
hello there. i am asking for a little help with creating layout like
this:


Just float the left stuff, left and float the right stuff, right and
allow the center stuff to flow between the two.

--
Gus
Jan 23 '06 #4
no. it is not simple three column layout. there would be no problem if
it would be.
here you can find my last efforts, all I need now is two vertical lines
to the left and right, just to close the frame around main content
"window". note that you cannot simply use an background property
because it will interfere with frame corners...

height has no matter in my layout. frame should always end with content
"window".

somebody?

Jan 25 '06 #5
> Just give it up and start thinking in web pages instead of
rectangular boxes with margins.


and who told you that height is 100% of the screen? height has no
matter, it is content "window" dependent.

Jan 25 '06 #6
oops, i forgot to paste a link ;)
here it is: http://marti.presents.pl/test/

Jan 25 '06 #7
Els
waste wrote:
Just give it up and start thinking in web pages instead of
rectangular boxes with margins.


and who told you that height is 100% of the screen? height has no
matter, it is content "window" dependent.


Who said anything about screen? AFAICS I didn't mention the word at
all. If you mean "who told you that height is 100% of the viewport",
then okay, my bad. Your example doesn't explicitly say it, it just
looked like you wanted 13px margin at the bottom, and I assumed you
didn't want more, nor less than 13px.

Not sure what you mean by 'content "window"', but if you mean that
height in your example isn't relevant, than just go with the stuff I
gave you, and you'll be fine.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Dr. Feelgood - She's Got Her Eyes On You
Jan 25 '06 #8
Els
waste wrote:
oops, i forgot to paste a link ;)
here it is: http://marti.presents.pl/test/


Looks very complicated when looking at the source - if only I could
figure out what you really want...

Do you want the left and right 'sidebars' to be without that
background? Do you want a plain and simple black border around both
sidebars? Do you want 13px margin between the sidebars and the side of
the viewport? Why are you using four divs for the corners? Not to get
the black borders I hope?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Dr. Feelgood - Blues Jam - Oil City Sheiks
Jan 25 '06 #9
waste wrote:

http://marti.presents.pl/test/


You made it a lot more complicated than it needs to be. How about:
<URL:http://kchayka.c-net.us/test/html/waste.html>

Adjust colors and backgrounds to taste.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jan 25 '06 #10

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

Similar topics

7
2734
by: James Thornton | last post by:
I'm trying to make the transition from tables to CSS, and I need someone to explain how to achieve the following layout (understanding the concepts behind this layout will help me considerably in grokking CSS positioning): http://unifiedmind.com/images/css-example.gif In this example, boxes one and two are wrapped in a box that is 100% wide.
7
2630
by: Zhang Weiwu | last post by:
Hello. This is problem puzzled me a long time. I wish to organize some block elements and let them flow one after each other like text. Think about a album, I wish the album have 12 thumbnails, each one has a comment line under the picture. And I wish when the screen size is big, this thumbnails arrange 3 rows, 4 columns; if the browser window is smaller, arranges 4 rows, 3 columns; if it's even smaller, 6 rows with 2 columns. If there...
5
1514
by: Steve | last post by:
I just noticed, in IE6, when navagating from one page to another with the same basic layout (centered top graphic, for example), that a page with a <script> block in the <head> shifts the HTML contents some number of pixels to the right. Other than putting a blank <script> block into each web page, or putting SCRIPT at the bottom of the BODY, any other way to work around this? Thanks
2
1502
by: SolarCanine | last post by:
Specifically, assume I have a div tag of absolute dimensions. I need to figure out, first, whether or not the text inside the div tag is partially hidden by the overflow setting, and if so, what the hidden text is. Is this even possible? Obviously, the rendering engine in the browser "knows" this information, but is it accessible through Javascript?
0
1153
by: Rolf Wolf | last post by:
Hi, Is it possible to optimize that nice navigation-formating that the length of each block element is defined in the following way: fixed space ( here realized with text-indent: 20px;) + length of the text + another fixed space on the right side which I dontknow how to define. thanks for inspiration, here is the code rolf
6
787
by: ste.paoletti | last post by:
hi, I have read that browsers support block element inside inline element but the css is not valid. Someone can tell me more about? What do you think? Thanks.
8
4244
by: VK | last post by:
Hi, given a block element with some content and a link, is it possible to set this element display to none by CSS only? It has to be done only once. It is an absolutely positionned element so visibility:hidden will do as well. <div> <p>Some content</p> <p><a href="#">Hide</a></p>
0
8753
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,...
1
9188
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9121
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...
1
6704
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
4522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4787
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3229
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
2642
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2159
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.