473,785 Members | 2,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I code my footer without Floats ???

https://testbed.odysseyshipping.com/index.php

This is driving me nuts. I've spent much time trying to style this
page footer but because I cannot set widths using "display: inline".
I've tried using floats. Now, for some reason, I can't get my borders
to display properly as it seems to nudge to the right for each level
of my footer (Firefox and IE).

Below is the CSS code.

I also need to place borders between each set of <ULand am dreading
that. Can I redo this footer without using Floats?

Thanks,
Don
#footer {
padding: 0;
margin: 0;
clear: both;
}

#footer_headers {
width: 100%;
margin: 0;
padding: 0;
padding-top: 5px;
padding-bottom: 5px;
float: left;
background-image: url(../images/menurest.jpg);
background-repeat: repeat;
color: white;
font-weight: bold;
}

#footer_headers :after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
* html #footer_headers { height: 1%; } /* for IE5+6 */
*:first-child+html #footer_headers { min-height: 1px; } /* for IE7 */

#footer_headers .footer_header_ title {
margin: 0;
padding: 0;
padding-left: 1%;
width: 24%;
float: left;
font-weight: bold;
}

#footer_links {
width: 100%;
margin: 0;
padding: 0;
float: left;
color: black;
text-align: left;
border-left: thin solid #2a78c3;
border-right: thin solid #2a78c3;
border-bottom: thin solid #2a78c3;
}

#footer_links:a fter {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
* html #footer_links { height: 1%; } /* for IE5+6 */
*:first-child+html #footer_links { min-height: 1px; } /* for IE7 */

#footer_links .footer_links_t itle {
float: left;
width: 25%;
}

#footer_links .footer_links_t itle ul {
margin: 0;
padding: 10px 10px 10px 10px;
list-style-image: url(../images/acc_arrow.gif);
list-style-position: inside;
}

#footer_links .footer_links_t itle li {
color: #993300;
text-align: left;
}

#footer_copyrig ht {
width: 100%;
margin: 0;
padding-right: 5px;
text-align: right;
font-size: 85%;
float: left;
border-left: thin solid #2a78c3;
border-right: thin solid #2a78c3;
border-bottom: thin solid #2a78c3;
}

#footer_copyrig ht:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
* html #footer_copyrig ht { height: 1%; } /* for IE5+6 */
*:first-child+html #footer_copyrig ht { min-height: 1px; } /* for IE7
*/

Jun 27 '08 #1
1 2046
On 2008-06-03, donpro <do*********@ro gers.comwrote:
https://testbed.odysseyshipping.com/index.php

This is driving me nuts. I've spent much time trying to style this
page footer but because I cannot set widths using "display: inline".
I've tried using floats. Now, for some reason, I can't get my borders
to display properly as it seems to nudge to the right for each level
of my footer (Firefox and IE).
Just lose width: 100% on #footer_links.

Width sets the width of the content area. So if you set width: 100% and
border: 1px the border box will be 2px wider than the container.

You're already setting width: 25% on each of the four floats, so the
container (which "shrinks-to-fit" them) will be the correct width
anyway.
Below is the CSS code.

I also need to place borders between each set of <ULand am dreading
that.
You will initially have the same problem-- if you set width to 25% and
add a border, the border box width will be slightly more than 25%.

But this is easily solved. Remember the old saw: "there is no problem
that cannot be solved with another level of nesting." As it happens you
already have another level of nesting. Leave the floats as width: 25%,
but put borders on the ULs inside them instead. They are auto width and
not floated (or anything else funny) which means the browser will solve
everything for you to make their margin boxes fill their content areas.
Their content areas will be 25% of the total.
Can I redo this footer without using Floats?
You could use a table. You want four sections of equal width with
borders between them. Tables do just that.

If you need to support IE you will need to use an HTML table. If not,
use display: table-cell on each "cell" (.footer_links_ title) and
display: table on div#footer_link s, since this isn't really tabular
data.

But I reckon you can get away with floats.
Jun 27 '08 #2

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

Similar topics

82
10723
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | | | | | | | | left | center | right | | | | | | | | |
3
5698
by: Tony Benham | last post by:
I've added a footer div to a website, which I've positioned using div#footer {width : auto ; border : 0 ; position : absolute ; bottom : 0 ; margin : 1.33em 1.33em 1.33em 1.33em ; background : teal ; font-size : 75% ; color : white ;} This appears to create a full width bar in IE6/netscape7.1, and a small bar on the left in opera 7.11, which is placed at the bottom of the browser window, even though the content may be longer than the...
1
3947
by: Tony Benham | last post by:
Hi, I've been trying for a while, but I still haven't worked out a way of making a footer appear at the bottom of a webpage, and not at the bottom of the browser window ! See http://woodleyzebrasfc.port5.com/index.html for an example. The div with id footer appears at the bottom of the browser window, but I'm trying to make it appear at the bottom of the page, so that you scroll down to see it if needed, and it will be placed below the...
6
6578
by: Quintus Snapper | last post by:
Hi everyone. I'm just making new HTML pages for a site. This time round I've brushed up on my CSS and trying to use as much of it as possible and as well as trying to keep it W3C compliant. So far everything's been going well and the code is currently about 1/3 smaller and running it through the W3C validator doesn't throw any errors! :-) I've basically got it how I want it minus one problem. And that is that I can not seem to figure...
1
2983
by: Will Buntin | last post by:
I am trying to design my site without tables, using CSS for positioning and am having limited success. My main issue is I have a three column layout and my footer needs to run across the page, after the longest content from any column has finished. I've found a few examples and I thought I had mine set up correctly, but obviously something is wrong. So if there is any CSS expert out there willing to give me some tips... The page is...
6
2180
by: NWhite | last post by:
Hi all, Could I ask: how do I drop the footer below the content in, for example, this page (and therefore the rest of the site where the problem arises): www.nowpc.co.uk/error404.html It seems such a simple problem, but any "solutions" I've tried so far have all broken something else or simply not worked. I know you guys are busy, but I would really appreciate any help on this. Thanks in advance. Best regards, Neil
0
1234
by: Robert Ashby | last post by:
I have a .jpg footer on my .aspx web page. When the datagrid loads it floats over the top of the web page footer. The footer does not move. I would like to footer to float on the web page and adjust according to the datagrid. If the datagrid is showing only 3 items or 20 items I would like the .jpg footer always to be at the bottom of the datagrid. How can I do this?? Thanks for the help
17
2717
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but know nothing about ASP. He can build the design of the pages in HTML with tables, labels, textboxes etc. But then I would need to change them to ASP.net objects and write the code to make the page work (normally I do this as I go - can't do this...
7
2619
by: Andrew | last post by:
I've been struggling to achieve the following layout for some time now and I'm not getting anywhere. I've tried several approaches including floats & absolute positioning and none seem to work, primarily due to the footer not being aware of the columns due to me floating / positioning them. I have the following (very simple) markup: <div id="head">...</div> <div id="left">...</div>
0
9643
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
10315
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...
1
10085
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
9947
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
8968
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...
0
6737
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
5379
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
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 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.