Jump to content


Photo

CSS div alignment problems


  • Please log in to reply
1 reply to this topic

#1 bullchina

bullchina
  • Members
  • PipPip
  • Member
  • 19 posts
  • LocationHouston

Posted 23 August 2006 - 08:56 PM

this site: http://dave.showviz.net/bet2/

has a header image with a red line under the text that is part of the image, and then a div sitting behind it that has a css border property to continue the 1px red line to the extents of the page.

however, in firefox on linux, the line doesn't match up, firefox on mac i got it to work, but if you change the font size, by hitting ctrl + or -, or however you do it, the image moves up and down.

The design should look like this:

http://dave.showviz.net/bet/19.jpg

and I can't decide what the best way to do it: as an extremely wide jpg with the red line and the text in it, with the text as actual text in the html, or how i have it now with a tweak in the css file so the image won't shift around.

any help would be great, thanks, dave

#2 makeshift_theory

makeshift_theory
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts

Posted 24 August 2006 - 09:00 PM

why is the border behind it?  Are you using z-index and absolute positioning, I don't have time to check because I'm at work.  Anywho I would recommend using the following code for your line and too fix any problems your currently having:

#line { 
width:100%;
height:2px; // Height of line
color:#FF0000; // Color right now set to red
margin:0px;
padding:0px;
}


[b]IN HTML:[/b]
<div id="line"></div>


try that and place it underneath your image.
<b>Emacs</b> it's great for the body.
<br><br>
<b>Trust the TechnoLust</b>

<b><u>Have a question check here:</u></b>
PHP Manual: http://www.php.net




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users