473,471 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Create 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 3775
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
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...
9
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...
23
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...
12
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...
3
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...
12
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
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...
5
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...
6
by: Geoff Cox | last post by:
Hello, I am using the following css ..hiddenDiv2 { display: none; } ..visibleDiv2{ display: inline;
0
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...
0
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,...
0
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...
0
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...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.