Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS styling a hyperlink [closed]

I'm trying to apply some style to an anchor tag <a> without success, I want to create a URL in the first hexagon with the style of the other hexagons. I need to have MyURL styled like "This is a title" in the other hexagons.

  <li>
    <div>
    <img src="https://farm3.staticflickr.com/2878/10944255073_973d2cd25c.jpg" alt="" />
      <h1><a href="#">MyURL</a></h1>
      <p>Some sample text about the article this hexagon leads to</p>
    </div>
  </li>

(solved) pen -> http://codepen.io/anon/pen/PZNWGN

This is based on the thread below:

Responsive grid of hexagons

Can anyone give me some help?

like image 840
odew Avatar asked Apr 19 '26 13:04

odew


1 Answers

It's inheriting position:absolute from the styles for #categories li *. Override it by adding:

#categories li h1 * { position: relative; }

Alternatively, replace #categories li * with something more specific.

like image 191
Blazemonger Avatar answered Apr 21 '26 04:04

Blazemonger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!