473,698 Members | 2,275 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

More positioning questions...

Hi,
I have made another simple page at http://tinyurl.com/hgaa - the CSS is
at http://tinyurl.com/h8cc

And I have a couple more questions that I hope somebody can help me with...

- How should I position the right bar with its top edge at the top of
the page and its left edge 2px from the right edge of the left bar,
without absolute positioning, and with both of the bars' widths changing
according to the font size? Can this even be done?

- Should both sections be seperate in the HTML, like they are in my
page, for example:
<div id="one">Sectio n one</div>
<div id="two">Sectio n two</div>

- How do I get both of the bars' heights to stay the same as each other?
That is, for example, if the left bar has twice as much text as it does
at the moment, the right bar will extend its height to be the same as
the left's?

Thanks for any help.

I know I'm asking a lot of questions, but I'm only trying to get it
right before I put it to use in a real page. If I hadn't asked any
questions, I'd be positioning *everything* absolutely, and trying to get
my pages to look *exactly* the same in every browser! :)
--
Andrew Jones
[please remove 'spluc.' from my
email address to contact me]

Jul 20 '05 #1
1 1791
In article <bf**********@h ercules.btinter net.com>, Andrew Jones wrote:
Hi,
I have made another simple page at http://tinyurl.com/hgaa - the CSS is
at http://tinyurl.com/h8cc
Please use real url, when it's longer than 80 chars, and when it is
longer, make it shorter. Tinyurl is good for multiline URL, but you don't
need it for your own urls, as your own urls are sencible and short.
And I have a couple more questions that I hope somebody can help me with...

- How should I position the right bar with its top edge at the top of
the page and its left edge 2px from the right edge of the left bar,
without absolute positioning, and with both of the bars' widths changing
according to the font size? Can this even be done?
#left {display:table; width:100%;}
#right {display:table-cell;border-left:2px solid white;}

Works on Opera 7.2b1. Or maybe you meaned something else.
- Should both sections be seperate in the HTML, like they are in my
page, for example:
<div id="one">Sectio n one</div>
<div id="two">Sectio n two</div>
No, your example has them nested (unless you changed it). This way you
propose is better, since it works on IE.

Other way as first:
div {float:left;mar gin-right:2px;}

(it is also possible to make it look like first, even with IE.)
- How do I get both of the bars' heights to stay the same as each other?
But them in container, use display:table etc. Many times all you need is
to make sure it looks like the boxes are as high.
Thanks for any help.

I know I'm asking a lot of questions, but I'm only trying to get it
right before I put it to use in a real page. If I hadn't asked any
questions, I'd be positioning *everything* absolutely, and trying to get
my pages to look *exactly* the same in every browser! :)


The fun thing with CSS is that you can mark up your real content before
you need to even think about layout. Do that, and ask more.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #2

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

Similar topics

13
3041
by: murali | last post by:
Hello everyone, I used absolute positioning with div tag in my website. The page looks cool as long as someone doesn't try to zoom in by increasing the text size (ctrl++ or thru changing font size in browser settings). When someone does that, the layers seem to overlap and the layer with a greater z value pops in front and the other layers are pushed back. The most obvious solution will be to prevent the user from increasing the text...
9
32053
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. However, there are images that I used absolute positioning in order to place them in the appropriate location on my page. When I do a browser resize, these images do not move (obviously). However, the rest of my content is auto centered as...
2
2098
by: Sailor Foley | last post by:
Hey i have created a footer class in a style sheet using absolute positioning but the problem is when i shrink the browser window this footer overlaps the main content as the windows shrinks. I have seen on sites that if you shrink the web page,when it begins to overlap the main content the footer won't overlap the main content. Does anyone know how this is done as i'm ripping my hair out over it. Thanks,
0
1240
by: chris ciotti | last post by:
Hi - The following page: http://www.geocities.com/chris_ciotti/Holding/site-template-sliced.html was generated with Photoshop CS and uses CSS for positioning. The page validates (unfortunately, you can't validate it from the geocities server as they paste in a bunch of crud which hoses the validation) but the top row of buttons (home, about etc) do not show up in IE 6, they are about 6px too far down. I'm not really sure why this is as...
8
1469
by: Christopher Benson-Manica | last post by:
I know I keep asking similar questions, but I really want to do this at least sort of right. Not to mention I got no on-group replies to my previous post :( I desperately want an interface that can allow classes that implement it to act sort of like streams, but I just can't seem to get everything I want... class Writable { protected: ostringstream outbuf; // or should I use private inheritance?
1
2800
by: Charles Harrison Caudill | last post by:
with tables there is a clean and algorithmic way to organize things, but with css which is, once you get it working, much cleaner, I have to tweak and patch and hope and pray and curse before things are positioned the way I want them. It *should* be easy to say: this goes on the left, this goes on the right, this goes in the center, all on the same line, with a background image...but I'm missing something. I would very much like a...
6
1374
by: | last post by:
I just installed VS 2005. Was working with 2003 and .Net 1.1. Trying to get the feel for a master page and I'm having some issues. I'm looking for a pretty basic setup. Standard header with an image, forced to lower right of screen, in the content area. I had this working just fine in 1.1, but the tags seem to behave quite differently in 2.0. If I remove the !DOCTYPE element, I get what I want. Is it dangerous to remove this? How can I...
2
1477
by: Michi | last post by:
Hallo, for hours i'm searching for an solution for the following problem: Inside a container i have some cathegories and in each of them some questions (look at HTML), The questions should be shown or hidden when clicking a cathegory (look JS and CSS). With a click on a question, it should be cloned and the clone should be placed over the question so you can drag and drop it from there to somewhere else.
6
2915
by: Mark | last post by:
hi, i'm trying to position something in the top right corner of a container, but i can't seem to figure out how to get it working. here's the html <div class='thumb'><a href='image.jpg'><img src='photos/thumbs/ bigsmile.jpg'></a><a class='del' href='?p=gallery&del=2'>x</a></div> where 'thumb' is my container, and 'del' should be aligned to the top right. here's the css
0
8600
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
9156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9021
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
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,...
1
6518
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
5860
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();...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
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
3
1998
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.