473,809 Members | 2,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with display:inline-block footer following a float:right div

31 New Member
Hi guys.

I have a footer set to display:inline-block so that it'll shrink to fit its contents. It works fine when it follows other block or inline elements, it seems. However, when it follows a div set to float:right, it aligns to the left of that div. Here's the relevant css:

Expand|Select|Wrap|Line Numbers
  1. #footer {
  2.     clear:both;
  3.     padding:0 20px 13px;
  4.     background-color:transparent;
  5.     border-width:18px 22px 0 20px;
  6.     -webkit-border-image:url(images/footer/footer-bg.png) 38% 5% 0% 5%;
  7.     -moz-border-image:url(images/footer/footer-bg.png) 38% 4% 0% 4%;
  8.     border-image:url(images/footer/footer-bg.png) 38% 5% 0% 5%;
  9.     display:inline-block;
  10.     margin-top:30px;
  11. }
  12.  
  13. #continue {
  14.     background-color:#c7bfbd;
  15.     margin:30px 0;
  16.     border-width:0 30px 5px 3px;
  17.     -webkit-border-image:url(images/continue-arrow-3.gif) 0% 62% 8% 6%;
  18.     -moz-border-image:url(images/continue-arrow-3.gif) 0% 62% 8% 6%;
  19.     border-image:url(images/continue-arrow-3.gif) 0% 62% 8% 6%;
  20.     float:right;
  21. }
  22.  
and the html:

Expand|Select|Wrap|Line Numbers
  1. <div id="wrap">
  2.     <div id="continue">
  3.         <p><a href="/somewhere/">You stay in control. Always.</a></p>
  4.     </div>
  5.  
  6. <div id="footer">
  7.     <ul>
  8.         <li>&copy; My website 2010 / </li>
  9.         <li><a href="/">Home</a> / </li>
  10.         <li><a href="/contact/">Contact</a> / </li>
  11.  
  12.         <li><a href="/legal.php#privacy">Privacy</a> / </li>
  13.         <li><a href="/legal.php#help">Help</a> / </li>
  14.         <li><a href="/legal.php#terms-of-use">Terms of use</a> / </li>
  15.         <li><a href="/sitemap.php">Sitemap</a></li>
  16.     </ul>
  17. </div>
  18. </div>
  19.  
I hope this gives you an idea of the problem.
Apr 15 '10 #1
2 3800
MusoFreak200
96 New Member
i will need a link if you have one...
Apr 16 '10 #2
seegoon
31 New Member
Actually guys, don't worry. I've solved it. Just added an empty div with the property clear:both and a height attribute. My footer's an include, so it works across the entire site. It would've been nice to have solved it using pure css and no extra elements, but such is life.
Apr 16 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6090
by: Desigan Chinniah | last post by:
I am presently trying to display a list of items INLINE using an image as a seperator..... and having difficulties.... See below for 3 seperate sets of html and css files. Each set does something different. Ideally I would like the result of Menu 1 but instead of having the pipe effect border on the right of each choice I would like to replace that with an image of some sort. Any help much appreciated.
9
2036
by: | last post by:
hi everyone, i was hoping someone could help me. the code below - in IE the menu options (text) are a couple of pixels too low and i cant move them up, and the form boxes are ok. in mozilla the reverse is true - the text links are ok but the form boxes are too low! I cant figure out why this is happening. I want the text to be vertically centered in the black menu bar, and the form boxes likewise. any help greatly appreciated!
23
3167
by: Mat | last post by:
<div id="container"> <div id="main"> <div id="header"> <p class="Address">123 Fake Street, </p> <p class="City">Crazy City, </p> <p class="Province">Ontario </p> <p class="PostalCode">H0H 0H0</p> <p class="Telephone">Telephone: 555-1234 </p> <p class="Fax">Fax: 555-4321</p> </div>
12
1905
by: Joel Byrd | last post by:
I am making an AJAX call when any one of a number of inputs in a form (search criteria) are clicked, checked, changed, etc. When the user clicks, checks, whatever, I am trying to display a "Retrieving results..." text. This should be really simple, but in IE, it does not work. Here's the code that is not executing in IE: And here is the context of that code, which is the AJAX function that is called when a radio button is clicked,...
3
1305
by: Depika | last post by:
I have created a design and although in firefox it looks as desired in IE the horizontal menu is acting weird. The first element of the inline list menu has no left padding and as a result the whole menu doesn't take the 100% of the width. I have tried many combinations in order to fix this problem but nothing. I would appreciate any help I can get. You can view the site here: http://depika.biz/marie/site/Site_English/
12
5583
by: Vadim Guchenko | last post by:
Hello. I'm using the following code: <html> <head> <style type="text/css"> pre {display: inline;} </style> </head>
2
3174
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if i change something in php file using in ajax function.it not refreshed,means its shows the previous result it not get updated.i can't understand whats the prob.this is the code i m using: <? include("config.inc.php"); //error_reporting(0); ...
5
14255
by: lightgram | last post by:
Hi I have a problem, which after browsing through Google, seems to be fairly common. However having tried most suggestions I am still getting the problem. I have a menu bar across the top of my page. As I click on each menu option a further list of links is displayed below it. Now in IE7 where I click on a menu option that has a large number of links below it it appears layered correctly over the top of the controls below.
6
1597
by: Geoff Cox | last post by:
Hello, I am using the following css ..hiddenDiv2 { display: none; } ..visibleDiv2{ display: inline;
0
9721
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
10633
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
10376
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
10375
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
10114
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
6880
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
5548
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...
1
4331
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
3011
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.