Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

css - column lengths & bottom banner


  • Please log in to reply
4 replies to this topic

#1 trails38

trails38

  • Members
  • 10 posts
  • OFFLINE
  •  
  • Local time:03:04 PM

Posted 07 January 2009 - 05:08 PM

The first web page for a site am converting to css (slowly as time allows) is at http://www.ilstewards.org/indexcss1.shtml. It is probably 90% done, but there are a couple of things I haven't figured out.
1-Once the index page is done, it will be mostly a case of building "includes" for the center columns of each subordinate page. I want all 3 columns to be the same length on each page; I can do that with the height command in my include, but that will require some manipulation as page content changes. Back when I used tables, the height of each cell (td) adjusted to the largest size in each row (tr); is there some way to do this with div's? I thought about placing each column's "include" statement in a table cell, but that defeats the purpose of using div's.
2-I would like to put a "banner" containing the organization's contact information on the bottom of each page - similar to the the green border at the bottom of http://www.ilstewards.org/index.htm. The code to place the border there just seems to be ignored.
Thanks in advance for any assistance - Linda

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:02:04 PM

Posted 07 January 2009 - 09:15 PM

I'm not sure if I fully understand what you are trying to do, so if I explain things in a way that doesn't make sense, just let me know.

#1) the size of a div can be set using CSS. If I am understanding your problem correctly, the length of the column varies, and you want your column lengths to be the same based on which ever column is the longest? The only way you can do that client side, and not using tables, is to use javascript to figure out which column is the longest, and then set the length of the other columns to match. This might be a PITA. Is there any reason that you can't just stick to tables, because that is probably the least complicated way to do it.

#2) I am not sure what you mean by "The code to place the border there just seems to be ignored." Does that mean in your code, or their code? If it is in your code, I would really have to see what you are talking about since your first link doesn't contain anything similar to what is in the second link.

#3 webrat

webrat

  • Members
  • 138 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:UK
  • Local time:09:04 PM

Posted 08 January 2009 - 07:37 PM

Regards point 1, would a combination of display: block, height and a bit of padding on the div not resolve it? It's not a dynamic solution but they would at least be all identical pretty much regardless of content.

Regard point two, have you checked your syntax? Looks like a simple table so should work every time. Run it through the w3c validator, it's caught errors for me that I've missed despite looking through the code twenty times. The brain just seems to ignore the obvious and makes assumptions based on what it expects.

Edited by webrat, 08 January 2009 - 07:38 PM.


#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:02:04 PM

Posted 08 January 2009 - 07:51 PM

The only problem I can see with your first solution is then what happens if the text is too big for the column? And how would one know how much padding to add? Perhaps you have a better idea than I do; I am just not seeing it. Of course, we are both making assumptions about the constraints. If we know for sure that the length of a column never need to be longer than x, then your idea would work fine.

#5 webrat

webrat

  • Members
  • 138 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:UK
  • Local time:09:04 PM

Posted 09 January 2009 - 08:09 PM

There's a method whereby you split a background image into two parts, like interlocking plates. I'm looking through the manuals for it at the moment but I think it would work. It resolves the overflow issue by expanding to fit the content and the padding is just a tweak to match the columns. I've used it for a nav-bar before but don't remember the code well enough to post an example.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users