homepage Welcome to WebmasterWorld Guest from 54.166.255.168
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Links not working in DIV
Opera behaves strangely
globay

10+ Year Member



 
Msg#: 956 posted 6:23 pm on Apr 29, 2003 (gmt 0)

This is the code:

styles.css:
############################
.infobox {
WIDTH: 200px;
POSITION: relative;
FLOAT: right;
RIGHT: -10px;
MARGIN: 2px 0px 2px 10px;
BACKGROUND: #FFE7CB;
PADDING: 5px;
BORDER: 1px #F3A010 solid;
}
############################

index.htm:
############################
#...
<p>Some Text here</p>
<div class="infobox">
Links here
</div>
<p>Some Text here</p>
#...
############################

Looks like: (more or less ;-)

----------
..........
..... ###
......###
......###
..........
----------

. : Text / Paragraph
# : Links

Somehow, the links in the div don't work. There is no reaction when I move the mouse on them. If I doubleclick on the link text, some text in the paragraph is highlighted. Only where there is a line break (end of Paragraph), the links works.

--
globay

 

Birdman

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 956 posted 6:47 pm on Apr 29, 2003 (gmt 0)

I think if you remove the relative positioning and just use margins to position the div it may work. It's good practice to use all lowercase too.

Something like this:

<style type="text/css">
.infobox {
width: 200px;
float: right;
margin: 2px -10px 2px 10px;
background: #FFE7CB;
padding: 5px;
border: 1px #F3A010 solid;
}
</style>

globay

10+ Year Member



 
Msg#: 956 posted 7:03 pm on Apr 29, 2003 (gmt 0)

Thanks birdman,

works perfectly,

--
globay

Nick_W

WebmasterWorld Senior Member nick_w us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 956 posted 7:29 pm on Apr 29, 2003 (gmt 0)

Yeah, you'll find that form elements don't work either in that scenario. It's a real pain the arse to work out too...

Nick

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved