I'm developing a restaurant's website. http://www.tsmchughs.com/
My template has div#content then div#navigation, which contains an
unordered list of links. I have positioned div#navigation on the left
side using the following:
BODY {
margin-left: 9.6em;
}
#navigation {
position: absolute;
width: 9em;
height: 100%;
top: 0;
bottom: 0;
left: 0;
}
I'd like to add a graphic to div#navigation, a 140px wide gif file.
Have I painted myself into a corner? How can I place the image in
#navigation and be sure that there is adequate space for both the
image and the text links?
--
Brian
follow the directions in my address to email me
Jul 20 '05
12 2319
"Stanimir Stamenkov" <s7****@netscap e.net> schrieb im Newsbeitrag
news:bo******** *****@ID-207379.news.uni-berlin.de... One could try setting 'max-width: 9em' for the image
That means resizing the logo which gives very bad display results with
graphics, specially logos.
but after all we rely on that in most of the cases 9em would be greater than 140px.
I am not sure how an em is calculated; from the typographer's point of view
it should equal the font size. If you calculate 140px/9 you get a minimum
font size of 16 pixels which equals 12 points on 96ppi Windows monitors.
That matches quite a large part of the audience. On Mac systems which
calculate screen resolution of 72ppi you get a minimum font size of 16
points which will be greater than most user settings. So these users will
have a bad display.
That's just an approach as some browsers also handle font sizes differently.
--
Markus
Markus Ernst wrote: "Stanimir Stamenkov" <s7****@netscap e.net> schrieb im Newsbeitrag news:bo******** *****@ID-207379.news.uni-berlin.de...
One could try setting 'max-width: 9em' for the image
That means resizing the logo which gives very bad display results with graphics, specially logos.
but after all we rely on that in most of the cases 9em would be greater than 140px.
I am not sure how an em is calculated; from the typographer's point of view it should equal the font size. If you calculate 140px/9 you get a minimum font size of 16 pixels which equals 12 points on 96ppi Windows monitors. That matches quite a large part of the audience. On Mac systems which calculate screen resolution of 72ppi you get a minimum font size of 16 points which will be greater than most user settings. So these users will have a bad display.
That's just an approach as some browsers also handle font sizes differently.
For your convenience:
img.daImage {
width: 140px;
max-width: 9em;
}
Given the presumption that 9em > 140px on most user systems the
image won't scale larger than 140px therefore there would be no
distortion. When on a particular user system 9em become less than
140px the image will scale down but won't overflow the 9em width
menu container therefore won't cover any important part of the main
document.
--
Stanimir
"Stanimir Stamenkov" <s7****@netscap e.net> schrieb im Newsbeitrag
news:bp******** *****@ID-207379.news.uni-berlin.de... Given the presumption that 9em > 140px on most user systems the image won't scale larger than 140px therefore there would be no distortion. When on a particular user system 9em become less than 140px the image will scale down but won't overflow the 9em width menu container therefore won't cover any important part of the main document.
It depends a little on the image but scaling down usually produces bad
results, too. Specially on graphical stuff as type or logos. Imagine a 1
pixel black straight line. It will produce 2 lines of different grey next to
each other if scaled down. Some browsers may handle that better than others,
but there is no control.
--
Markus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lars G. Svensson |
last post by:
As a regular ciwas reader, I learned that fixed-pixel designs are evil, so
for the newly created site http://www.ddc-deutsch.de (in German, still very
much under construction) I arranged the content (left) and the menu (right)
(ideas stolen from bluerobot.com) using percentage widths (75% content, 25%
menu). This looks nice in Opera 7.11 but in IE 6, content and menu are
overlapping.
When reading the following, please keep in mind, that...
|
by: Alan Clark |
last post by:
Hello Everyone.
I gave up on frames, and now I'm trying to achieve the same navigation
with CSS - which is probably not the best idea. I've hit a strange
snag.
I've positioned a top banner DIV at 2% left and width of 96% absolute.
Underneath, I have three DIV columns, the first at 2% left, width 27%,
the second at 31% left, width 38%, and the third at 71% left, width
|
by: Brian |
last post by:
Shame on me for not testing my site http://www.tsmchughs.com/ in MSIE
at "larger" font size. I just did today, and found an unpleasant
result. The content gets pushed behind the navigation, which has
position: absolute.
There's a second problem which is merely cosmetic. The width of
headings in a secondary navigation are not taking the full width of
the containing block.
Here's a simplified test case, with both problems detailed.
|
by: Steve Sabljak |
last post by:
I seem to having a little trouble getting a table to display correctly
in both msie and firefox. I want to set the table and column widths in
pixels, and have some cell padding too. The table displays correctly
in standards compiance mode in firefox, but not msie, where the
padding is added on to the column widths.
the table size is always correct, but the column widths are not what I
expect them to be.
If I change the column widths to...
|
by: TJ Talluto |
last post by:
<facts>
I have a "month calendar" that always displays exactly 42 days... and
alongside is a vertical box that displays the detail (form fields) of any
particular select event that appears on the calendar, so that the event may
be changed, or a new event may be created.
monthname
X X X X X X X form
X X X X X X X form
X X X X X X X form
| |
by: saxm-un |
last post by:
Hi, I'm just beginning CSS based web development and although I've been
bashing away at it since yesterday, I'm still stuck with positioning
things on pages.
I'm trying to make (in table-speak) two (or possibly more later) rows
each of three columns, with a table width 60% of the width of the
screen with a 10% left hand margin. I've been bashing away at the CSS
for a while now, and I'm almost there (except I can't get the top-edge
of...
|
by: Midsomer |
last post by:
Hi. I have an Access database with a form containing 4 datasheets and I
allow the user to change column widths. On closing the form, a routine
is fired that saves each column width to an INI file.
When the form is opened, the INI file is read and sets up the column
widths for the user.
Works well, but there is a slight delay on closing the form, so I would
like to detect if any column widths have been changed and save them
only if...
|
by: Stan Brown |
last post by:
For some time now, I've been wanting to improve the look of the menus
at my site http://www.tc3.edu/instruct/sbrown/stat/ . I like way
these two work, opening a submenu when hovering on a selection:
http://www.cssplay.co.uk/menus/simple_vertical.html
http://www.grc.com/menu2/invitro.htm
They are pure CSS with no JS (even for MSIE 5 and 6). And they
degrade acceptably in a non-CSS browser like Lynx. But both are set
|
by: Amir Michail |
last post by:
Hi,
I would like to center a logo between left and right floats with
different widths.
The issue is that the logo should be centered with respect to the
window, not the area between the left and right floats.
Is there an easy way to do this?
|
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...
|
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,...
| |
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |