473,378 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

CSS Havoc

Hi,

I'm posting here my HTML and CSS work. The problem is that when I add the float: right argument to class="indexSectionTitle", the background-image disapears. When I take that argument out, it comes back. Anyone has any idea why?
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4. <title>Your Page Title</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <!-- (en) Add your meta data here -->
  7. <link href="CSS/reset.css" rel="stylesheet" type="text/css" />
  8. <link href="CSS/basemod.css" rel="stylesheet" type="text/css" />
  9. <!--[if lte IE 7]>
  10. <link href="patches/IE Patchfile.css" rel="stylesheet" type="text/css" />
  11. <![endif]-->
  12. <style type="text/css">
  13. <!--
  14. body {
  15. background-color: #000000;
  16. }
  17. -->
  18. </style></head>
  19. <body>
  20. <div id="page_margins">
  21. <div id="page">
  22. <div id="main">
  23. <div id="col1">
  24. <!-- LEFT COLUMN CONTENT START -->
  25. <div id="col1_content" class="clearfix">
  26. <div>
  27. <?php include 'banners.php'; ?>
  28. </div>
  29. <ul id="navlist">
  30. <li><a href="#" class="menu">CONCOURS</a></li>
  31. <li><a href="#" class="menu">FORUM</a></li>
  32. <li><a href="#" class="menu">NEWSLETTER</a></li>
  33. <li><a href="#" class="menu">RECHERCHE</a></li>
  34. </ul>
  35. <div class="indexLeft">
  36. <span class="indexSectionHeader">MUSIQUE</span>
  37. <ul class="indexSectionTitle">
  38. <li>CONCOURS</li>
  39. <li>DERNIÈRES NOUVELLES</li>
  40. <li>PARUTIONS RÉCENTES</li>
  41. <li>CRITIQUES</li>
  42. <li>ENTREVUES</li>
  43. <li>PHOTO / VIDÉO</li>
  44. </ul>
  45. </div>
  46. </div>
  47. </div>
  48. <!-- LEFT COLUMN CONTENT END -->
  49. <div id="col3">
  50. <!-- RIGHT COLUMN CONTENT START -->
  51. <div id="col3_content" class="clearfix"> THIS IS THE LEFT COLUMN</div>
  52. <div id="ie_clearing"> </div>
  53. </div>
  54. </div>
  55. <div id="footer"> footer </div>
  56. </div>
  57. </div>
  58. </body>
  59. </html>
  60.  
Expand|Select|Wrap|Line Numbers
  1. @charset "UTF-8";
  2. /**
  3. * "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
  4. * (en) Template for designing a screen layout
  5. * (de) Gestaltungsvorlage für die Erstellung eines Screenlayouts
  6. *
  7. * @file basemod_draft.css
  8. * @creator YAML Builder v0.3 Preview
  9. * @link http://builder.yaml.de
  10. */
  11.  
  12. @media all
  13. {
  14. /**
  15. * Design of the Basic Layout | Gestaltung des YAML Basis-Layouts
  16. *
  17. * @section layout-basics
  18. */
  19.  
  20. /* Page margins and background | Randbereiche & Seitenhintergrund */
  21. body { background-color: #000000; }
  22.  
  23. /* Layout: Width, Background, Border | Layout: Breite, Hintergrund, Rahmen */
  24. #page_margins { width: auto; min-width: 740px; max-width: 90em }
  25. #page { }
  26. #header { }
  27. #footer { }
  28.  
  29. #navlist { margin-top: 100px; margin-bottom: 20px }
  30. #navlist li { display: inline; list-style-type: none; padding-right: 20px; }
  31.  
  32. /**
  33. * Formatting of the Content Area | Formatierung der Inhaltsbereichs
  34. *
  35. * @section layout-main
  36. */
  37.  
  38. #col1 { float: left; width: 50%}
  39. #col2 { display:none}
  40. #col3 { width: auto; margin: 0 0 0 50%}
  41. #col1_content { padding: 0 10px 0 10px }
  42. #col3_content { padding: 0 10px 0 10px }
  43.  
  44. /* PAGE INDEX */
  45. .menu { color: #FFFFFF; text-decoration: none; font-size: 1.3em; font-weight: bold; }
  46. .indexLeft { background-image:url(../images/gradient_index.gif); background-repeat: repeat-x; }
  47. .indexSectionHeader { font-family: Palatino Linotype; font-size: 3em; color: #000; float: left; }
  48. .indexSectionTitle { float: right; width: 200px; }
  49. }
  50.  
Jan 3 '08 #1
2 1673
drhowarddrfine
7,435 Expert 4TB
This is hard to follow. You float the spanned text left, then float the list right. Removing the float from the span makes it show, but I'm having trouble following where everything is going.

Your span is in the middle of a div but the text has no tag attached, which is OK but it looks like it's a title of sorts so make it so; <h1>.

You have far, far too many divs in there. We call it 'divitis' and it's making it hard to follow. You might be able to eliminate all of them but maybe three as a guess.
Jan 3 '08 #2
I know there are a lot of divs in there.

It is also true that I should put a <h1> instead of a span and I've done so.

What I want to do is to have the h1 stick on the left of the box and the list stick on the right of the box with the background image showing. Would it be possible to look at my code and tell what's wrong with what I've done in order to acheive that?
Jan 3 '08 #3

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

Similar topics

43
by: Spare Change | last post by:
This is a recommendation to Microsoft. VB.net and c# are almost exactly equivalent. I know why Microsoft invented VB.net -- to wean old style VB6 scripters into a true OO world: .Net. But...
761
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer...
1
by: Rob R. Ainscough | last post by:
I keep getting this error message when I build my solution: Error: The dependency 'xxx.xx.xx, Version=1.0.2067.27633, Culture=neutral' in project 'xxx.xx.xx' cannot be copied to the run directory...
3
by: Squirrel Havoc | last post by:
I am starting to write an FTP server, but I don't understand the PASV protocol. RFC's haven't been much help, since they don't describe what it is, or how it's done. Just what it can do (I think...
2
by: Sam | last post by:
When I am debugging my asp.net application with breakpoints I notice I have two concurrent threads running at once. Why is that? It is causing havoc with my response.redirects. Note, I am not...
16
by: chrispatton | last post by:
I have some questions about Dynamic Memory allocation. I wonder if anyone can clear up a couple things. (1) I am lead to believe that when you allocate memory for an array dynamically, it is not...
2
by: Bob | last post by:
Hi, I'm writing an application using an API that's still under development. Most data is communicated via std::map<and so forth. Correct me if I'm wrong, but isn't that a bad idea? If a function...
1
by: Klaus Jensen | last post by:
Hi I am trying to post-process some XML-documents from some third-party software. I open them, find the right element, manipulate the text and write it back to the element.
17
by: HartsVideo | last post by:
Hi, No one seems to know the answers to these questions or they're just not telling. I downloaded and installed .NET Framework 2.0 and along with it came ASP.NET. .NET Framework 2.0 wrecked...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.