LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-15-2010, 05:38 PM   #1
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Unhappy CSS: Two Component Full-Width Banner


I'm trying to set up a simple title banner for my web pages, using HTML and CSS, but I can't quite seem to get what I want. Here is the closest I have been able to get so far: (And I'd prefer to avoid using a table if it can be done.)

Code:
<style>
a img {
  border-style: none;
}

div#rcdp_thin_banner {
  width: 100%;
}

div#rcdp_black_bar {
  width:	100%;
  background-color: #000000;
  display: inline;
}
</style>

<div id="rcdp_thin_banner">
  <a href="http://www.arsc.edu">
    <img src="/img/arsc_acronym_4color.gif" alt="Arctic Region Supercomputing Center" />
  </a>
  <div id="rcdp_black_bar">
    <img src="/img/rcdp_thin_banner.png" />
  </div>
</div>
What I want is for a thin banner to stretch across the entire width of the page. The left image (the gif) is a small squarish icon. The right image (the png) is a black image with white lettering inside. I need to portray the illusion that the png stretches all the way to the right side of the screen, which I why I made the second div have a black background.

Problem is that the black does not stretch all the way to the right side of screen. If I turn off "inline" on the second div, the black does stretch out like it should, but then the second div drops below the first icon, instead of being next to it.
 
Old 01-16-2010, 01:13 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Perhaps it is the outer div that should have the black background? (I'm assuming you want the two images inline and to the left). Then you don't even need an inner div (or you can have two inner divs, and float them where you want them).

Last edited by neonsignal; 01-16-2010 at 01:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS - Is there a way to put several lines of HTML into one line using CSS? Chronothread Programming 12 01-05-2011 06:06 AM
Crash: Suggestion Time! Which component is the culprit? -full description included- wotsits Linux - Hardware 9 11-21-2009 01:45 AM
css columns of same width rblampain Programming 2 12-22-2007 06:54 AM
HTML/CSS/JS: Problem with <p> not having an absolute position with CSS. RHLinuxGUY Programming 7 03-03-2007 12:21 AM
CSS width property ssfrstlstnm Programming 3 01-07-2007 03:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration